4 ms·
Ask HN: How should I set my servers up to scale?
So right now I have one server from linode.
How should I go about getting ready to scale? Should I have one server for the database, one for web server, and one app server?
How do you currently do it?
- elliottcarlson 16y agoOur current minimum setup for one of our apps is as follows: We have an nginx based load balancer that goes between two web servers both running nginx with php_fpm. The webservers are deployed via svn post commit hooks that call a private network based api to do an export of a tag on svn. Both servers access a single database server running mongodb and there is also a single media server (because most of our projects have uploading capabilities from the admin system and instead of distributing the content on both servers, this single system handles the uploading, storing, deploying to S3 and other nifty things) - this is written in node.js. With this setup we can easily expand by adding additional servers in the server pool, add additional load balancers and round robin dns through those, change the primary database to be a entry point to a cluster of DB's etc. This is our poor man's scaling system - I'm not sure if it's the most efficient, but it has worked for us quite well so far.
- kcud 16y agoThanks a lot, very helpful information!
- dangrossman 16y agoHow to scale...what? A video encoding service doesn't scale the same way as a blog. An analytics service doesn't scale the same way as an email marketing service. What architecture is optimal depends on what you need it to do.
- bensummers 16y agoWait until you need to scale. Then, analyse your actual system under load. Address the biggest performance problem. Repeat.