Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I realize the diagram is likely heavily over-simplified, but what's the reason for the nginx layer? It doesn't look like you guys are serving assets through those boxes, so it seems like you have an unnecessary extra hop from the ELB to the app servers. My guess is this is either nginx caching, a holdover from the pre-aws architecture or a measure to keep the system decoupled from ELB?


I can't speak for Parse, but I've come up with something similar in the past. Nginx/HAproxy as a combo is far more flexible than the ELB alone, you might want to use it for rate limiting, better load balancing algorithms, better logging, tweaking headers, handling errors, or controlling buffer sizes for example.


Or for preventing DoS attacks from slow client connections. Unicorn is not designed to be exposed to the outside world; it needs a reverse proxy that does request buffering, like nginx (which the Unicorn docs recommend).


True, though the ELB also does some simple buffering of HTTP requests.


We use nginx for serving static files and doing some trivial top-level routing. Haproxy is for load-balancing among families of unicorn app servers.


> I realize the diagram is likely heavily over-simplified, but what's the reason for the nginx layer

probably to load balance between unicorn instances in the particular amazon EC2 instance




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: