

Git Push Heroku Master: Now 40% Faster - JoshGlazebrook
https://blog.heroku.com/archives/2014/2/11/git_push_heroku_master_now_40_faster

======
nthj
I'm really glad to see Heroku focusing on these types of optimizations. We've
been using similar optimization strategies internally at my Rails consultancy
for over a year [1], and it's amazing how much fun it is to ship features when
you can add a small feature, check your test suite via CircleCI, and be live
quickly thereafter.

I remember the pain of deploying Huckberry [2] on Rails 3 a couple of years
ago. Each deploy took ~6 minutes, and it'd drive us crazy. A whole lot of
"Compiling!"-type [3] moments. (Back then, the Asset Pipeline compiled all of
your assets twice: once with the real filename, once with the digest-filename:
'filename--f74c093df554be59d45d3c87920eba1f.js'. As you can imagine, this was
quite slow.)

This is one of the reasons I really love Heroku as a development platform.
We're a 4-person shop—we can't spin off a resource to spend 2 weeks speeding
up our deployment process. But with Heroku, we wake up one morning, and our
processes our 40% faster. It's fantastic.

[1] [https://github.com/heroku/heroku-buildpack-
ruby/pull/96](https://github.com/heroku/heroku-buildpack-ruby/pull/96)

[2] [https://secure.huckberry.com/](https://secure.huckberry.com/)

[3] [https://xkcd.com/303/](https://xkcd.com/303/)

[edit: formatting]

------
d0m
That's great!

My biggest problem right now in term of deployment time is to sync with amazon
for the assets. It literally takes 5 minutes for a small website..

~~~
friism
At Heroku we now [recommend using AWS CloudFront][1] to serve assets, backed
by your app running on Heroku instead of with S3. It's a much simpler setup
with less state and fewer moving parts - and builds are faster :-).

[1]: [https://devcenter.heroku.com/articles/using-amazon-
cloudfron...](https://devcenter.heroku.com/articles/using-amazon-cloudfront-
cdn)

~~~
beambot
Isn't this still problematic with SSL? Last time I checked, you had to pay
$600/mo for a custom CloudFront SSL cert if you wanted to pass through the
credentials from your own domain.

(Using mixed http/https was not an option.)

~~~
friism
It's true that this is a problem if you insist on serving your CDN assets a
custom domain CNAME mapped to CloudFront (i.e.
[https://assets.mydomain.com/](https://assets.mydomain.com/)). It doesn't cost
extra if you just use the default CloudFront distribution URL, i.e.
[https://d3vam04na8c92l.cloudfront.net/stylesheets/applicatio...](https://d3vam04na8c92l.cloudfront.net/stylesheets/application-6502e5a88f02b90aeb32c2dd21ea37ab.css)

This is not entirely clear from the Heroku docs, I'll ping the maintainer for
an update.

~~~
nthj
One cool trick for serving mixed http/https that I somehow went 10 years
without finding out: you can just point your Rails asset_host to
"//d3vam04na8c92l.cloudfront.net". Browsers understand this to mean "Look up
this address via whatever protocol I am currently on, http if http, https if
over SSL."

This is a huge cache boost in Rails because you don't have to cache your pages
twice (once for HTTP once for HTTPs.)

~~~
girvo
Oh god.. While your post is cool, I reacted violently to the "One cool
trick..." part at the beginning.

Upworthy, you've broken me.

------
brianmcdonough
That's great, Now, if only Heroku were 40% less expensive...that would be
progress.

~~~
goldenkey
A little time spent learning how to use a server and build an actual scaling
infrastructure, and Heroku turns into dust for dumb dorks. Heroku is the MSFT
of servers, lock yourself in, and prepare to feel the bind as it gets tighter.

Seriously people, DIY, it isn't hard. Let the "180 websites in 180 days" [1]
girl use Heroku, she's giddy to get anything working. Real hackers should not
be satisfied with lock-in, ridiculous prices that correlate with the
ineptitude of the user-base, potential downtime on top of AWS normal downtime
(what Heroku uses in the background.) If you're serious about your business,
Heroku makes no sense at all, lest you be a non-technical cofounder, and it
makes you feel 'safe.'

[1] [http://jenniferdewalt.com/](http://jenniferdewalt.com/)

~~~
michaelmior
It seems you're trying to insult someone who's making an effort to learn some
new skills. Not sure what this has to do with the topic at hand.

As to the point of DIY not being hard, getting something working may not be
hard. But handling fault tolerance, logging, backup, downtime, etc. is non-
trivial. And as mentioned in other comments, this takes _time_. Even if you're
a l33t ub3r h4x0r, that will always be true. For some teams, the DIY
investment will make sense, others would rather spend their time building
features than dealing with ops.

~~~
goldenkey
This conversation isn't geared toward insulting Jennifer, it's an attack on
the lameness of using Heroku. I think Heroku users should each get a sticker
that says 'I'm a proud black box user'

------
ochoseis
So this might be an aside, but given all the complaints about how expensive
Heroku is (despite the free tier, how they handle everything below the app,
it's the gold standard in PaaS) has anyone tried out competitive services like
Cloud Foundry [1], OpenShift [2] or Cloud66 [3]? Cloud Foundry and OpenShift
are either hosted with similar free tiers or you can set up yourself, and
Cloud66 is more for the DIY crowd being free for development environments. I
do appreciate Heroku's free tier for toy projects but if you had to scale on a
budget (and could handle the setup) don't know if that'd be a better starting
point than the other options.

[1] [http://www.gopivotal.com/products/cloud-
foundry](http://www.gopivotal.com/products/cloud-foundry)

[2] [http://openshift.com](http://openshift.com)

[3] [http://cloud66.com](http://cloud66.com)

------
sergiotapia
I wanted to give Heroku a try for a new website my brother and I are building
and looking at the costs it's quite steep.

$35 for a measly 2 dyno application, and another $50 for a production
postgresql database.

Our use case is REALLY simple, we aren't building some freak sideshow redis
golang nonblocking nodejs mongodb ravendb nqueue sync rabbit hyperthreaded
monster. We're just building a Rails 4 site, with a PostgreSQL database
backend. That's ENOUGH for our use cases. For what we need it's infinitely
cheaper to just rent a Linode/DigitalOcean server, use something like Chef to
spin up the services we need and voila. We probably won't have to touch the
servers for a very long time. Again: We're doing simple things - CRUD
basically.

I love Heroku for it's simple usage but it's just too darn expensive for us.

~~~
nthj
Hey Sergio, my agency's website [1] has been happily hosted on Heroku for a
year and I pay approximately $0 for it. You have to set up your site for
performance—caching, CDN, use Unicorn, the like—but unless you have something
like 30 concurrent users, I think you might be overthinking it. You definitely
don't need a production-level PostgreSQL database.

That said, I'm pushing my developers to use Middleman [2] for mostly-static
sites these days. No moving parts means nothing can go wrong, and we host on
GitHub pages for free. Not sure if this fits your use case.

I'm a bit of a Rails performance nut, feel free to ping me at
nj@thirdprestige.com if you'd like to ask me more specific questions.

[1] [http://www.thirdprestige.com/](http://www.thirdprestige.com/)

[2] [http://middlemanapp.com/](http://middlemanapp.com/)

~~~
sergiotapia
Yeah that number is pretty abysmal. We average around 100+ users per second
per Google Analytics. That means, we might need about 4 dynos for our simple
website? Yikes!

~~~
nthj
If it's really "simple" (not dynamic, or doesn't change often), you should
throw the whole site behind a CDN. Then you can support tens of thousands of
users very in expensively.

------
zarriak
The sad thing is, deploying code should be this easy and fast whether or not
your are using Heroku.

------
pacifi30
This is so awesome. Though I only have 2 servers and repo is not very huge but
sometimes it takes close to 10 secs to deploy. A 45% decrease for python is
incredible

~~~
whalesalad
10 seconds? Buddy... You've got nothin to complain about.

------
joeblau
Just did a node.js deploy and it definitely felt faster.

