I want to boost up my website so i do a bit research on this. I’ve found many options such as :
Setup Nginx as reverse proxy by forward dynamic requests to HTTPD or php-fpm : For this which one is best option ? Can i setup php-fpm on few droplets as processing power and Nginx forward dynamic request to these php-fpm pool. I’ve searched on google about this but mostly only different pool on same machine not separate machine.
if I setup HAProxy as load balancer to apache ? Does it better than first option ? For example : I have 1 droplet setup HAProxy and other 2 droplet setup HTTP. I’m concerned about source code of the projects. Do I need copy each source code to each droplet and keep each one up to date ?
If you have better web server architecture plz recommend .
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
What you could do is setup Nginx as a reverse proxy for Apache and serve only the static files via Nginx.
You can follow the steps on how to do that here:
Or what you could try is using Nginx and PHP-FPM rather than adding an extra web service like Apache. You could follow the steps here:
I think the best way to test which one works better for your application is by doing some stress testing with both setups, here are a few great tools that you could use to do that:
https://www.digitalocean.com/community/tutorials/an-introduction-to-load-testing
Hope that this helps! Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.