7 ms·
How Heroku Works
- znowi 13y agoSince Heroku's Ugly Secret I don't trust this company. http://news.rapgenius.com/James-somers-herokus-ugly-secret-lyrics http://news.rapgenius.com/James-somers-herokus-ugly-secret-l...
- benhalllondon 13y agoRe: The Rap Genius Question: """A random selection algorithm is used for HTTP request load balancing across web dynos"" bit more.... """and this routing handles both HTTP and HTTPS traffic. It also supports multiple simultaneous connections, as well as timeout handling."""
- positr0n 13y agoFor example, dynos are cycled at least once per day Why so often? I wonder if this is just to protect against memory leaks leading to poor performance from poorly coded apps or if it's an issue with their infrastructure.
- gkop 13y agoFor one thing, it demonstrates empirically that the app can be successfully restarted.
- derefr 13y agoI would bet it's horizontal migration to "compact" dynos down onto fewer servers during off-hours, so they can terminate some of their EC2 instances. Basically, generational garbage collection performed on VM containers.
- bifrost 13y agoI have yet to see one rails app that doesn't leak memory like crazy, this is the easiest way to maintain sanity :)
- ryan-allen 13y agoStop using RMagick!
- bifrost 13y agoTrust me, I don't use rails at all anymore.
- davidbanham 13y ago""""If you’re using some established framework, Heroku can figure it out. For example, in Ruby on Rails, it’s typically rails server, in Django it’s python <app>/manage.py runserver and in Node.js it’s node web.js.""" Been working in node for years now, have never named anything web.js. Why not index.js, server.js or app.js?
- deleted 13y ago[deleted]
- sksksk 13y agoYou define the start command in the package.json anyway, so presumably Herkou can just read that?
- tlrobinson 13y agoYeah I think that's a relic of their very early Node.js beta. Now they look for package.json (https://github.com/heroku/heroku-buildpack-nodejs/blob/master/bin/detect#L4 https://github.com/heroku/heroku-buildpack-nodejs/blob/maste...) and you define the command to start the app in the Procfile.
- jonmountjoy 13y agoDang - thanks for catching. Fixed.
- bradhe 13y agoDoes...it really matter?
- tlrobinson 13y agoHere's my outsider's analysis of how Heroku works (well, worked in 2011) from a couple years ago: https://www.quora.com/Scalability/How-does-Heroku-work https://www.quora.com/Scalability/How-does-Heroku-work
- hk__2 13y agoHere is the full link, for those that are not on Quora: https://www.quora.com/Scalability/How-does-Heroku-work/answer/Tom-Robinson?share=1 https://www.quora.com/Scalability/How-does-Heroku-work/answe...
- diminish 13y agoHas the whole or parts of the architecture been made available as open source? I want to create a container based PAAS architecture myself, based on docker etc. Does anyone recommend a ready made solution similar to heroku, to serve ruby web apps.
- bradleyg_ 13y agoThis looks promising https://github.com/progrium/dokku https://github.com/progrium/dokku and even uses Heroku buildpacks.
- tlrobinson 13y agoDokku is cool, but its a small piece of a full PaaS platform like Heroku. It doesn't scale beyond a single "dyno"/machine or do multitenancy.
- zeckalpha 13y agohttps://github.com/ddollar/foreman https://github.com/ddollar/foreman is what is used for the local testing, but also for the actual running of the app on the Cedar stack. One could use Foreman and Docker and AWS to make a pretty reasonable PaaS. (I'm working on a S3 static-site-only version of Heroku so people don't have to serve static sites behind 3 layers of web servers.)
- oelmekki 13y ago> Terminology: Dynos are isolated, virtualized Unix containers, that provide the environment required to run an application. ... also known as "process".
- codebeaker 13y agoActually I believe the containers are implemented with something similar to http://lxc.sourceforge.net/ http://lxc.sourceforge.net/ which is more akin to a process level chroot, and kernel resource limits. This also the same technology that fundamentally underpins Docker and some other similar super-lightweight virtualisation technologies. With lxc and buildroot, for example it's trivial to create a self-contained 20Mb image for running a PostgreSQL server. With all the security guarantees [sic] that would be provided by paravirtualisation.
- oelmekki 13y ago(this reply is for jschulenklopper too) Certainly, it was provocative of me to imply it was that simple : when you have to deal with processes at this scale, you can't do it without any sandboxing if you want to avoid users messing with one another. It's still the basic scheme, though : when you rent dynos, you actually rent processes. That's the heroku business model (with all the deployment sugar on top of it, of course), and I'm always surprised people are ok to pay that much to rent processes. Of course, one could argue you can spawn multiple processes in a dyno. But 1. thoses processes have to consume very low memory because of low memory limits of dynos and 2. this could lead to boot up nightmare. Before the "rap-genuis-gate", the company I worked for then had scalability issues with heroku, being the later described router random timeout problem. Our dyno costs were already very high, even when using hirefire, so adding more dynos sounds not a good option. We tried to replace thin with unicorn, which was later the proposed solution from heroku. But even with two unicorn workers, we reached memory limits. Even worse : when dyno booted unicorn master process, it considered itself ready, while unicorn was still spawning its children, so it ends up with more failed requests. Bottom line is : using (and paying for) a heroku dyno is basically the same as using a process on a dedicated server. That may not be a problem, provided heroku clients are aware of that, and are not sold dynos as if it was what we all know as virtual servers.
- happywolf 13y agoNot trusting a company that has a record of inaccurate documentations, and a record of ignoring customer complaints until got hammered hard (enough)
- psychometry 13y agoWell, they're obviously working on improving their documentation and have made public statements about some of the high-profile complaints. Is that not what you want? Or would you prefer they do nothing so that you can continue making tired accusations against them?
- happywolf 13y agoHow do you know they document accurately this time? 'Obviously' as compared to what? Except if you have internal access to their source code and be able to verify against the documentation. I am always happy to give honest mistakes a chance, but not to a company who ignored customers complaints for years, sold inaccurate tools for big bucks, and tried to obfuscating documentation to hide the change of algorithm in request routing at dyno level. Sorry, I just find these acts are bordering evil, and my money will go to other businesses. If you are not so sure what I am talking, read the following link and see how Heroku's CTO and COO responded to complaints. http://news.rapgenius.com/Lemon-money-trees-rap-genius-response-to-heroku-lyrics http://news.rapgenius.com/Lemon-money-trees-rap-genius-respo...