Hacker News new | past | comments | ask | show | jobs | submit login

Nginx is your best friend.

I always have an Nginx proxy in front of services. Whether it's Go, Ruby or Node (or Docker)




And Apache/PHP and Tomcat and all the things. Nginx as the Frontline has been my policy since forever.

For resilience, HA, proxy routing, static files, masking backend errors, caching.

Does HTTP+S and 2 and Websocket so nicely.

Nginx all the things.


One thing I've found lacking in Nginx is active health checks. I know this is a feature in Nginx Plus, but I'm curious to know if there are any elegant open source solutions for this.


HAProxy does health checks. Might not be worth adding that inline for your needs but it does a good job of load balancing.


Can you clarify why?


Not OP but if you want an app in production then you want to be able to configure the http parts and script with command line tools. And if you start doing all that then you're basically reinventing nginx. Even comparing Java, nginx still has nicer http features, such as reloading ssl certs and config without dropping connections.


@logn clarified pretty well.

Anything you do in your service other than your own business logic is reinventing the wheel (I mean in the HTTP level), and not doing it so well as someone before you (nginx/HaProxy etc...).

This is a generalization of course, but my strategy of putting Nginx in front of everything didn't fail me so far.


You say strategy, I think you meant well established, battle tested and proven, industry standard best practice.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: