What is Nostr?
Taylan (Male Feminist Arc) /
npub1uzc…hsyy
2024-11-23 16:15:13
in reply to nevent1q…9xgj

Taylan (Male Feminist Arc) on Nostr: 翠星石 munir Zergling_man +1 for Nginx for high loads. Ask me about using it as a ...

翠星石 (nprofile…vqps) munir (nprofile…lcaw) Zergling_man (nprofile…pltp)

+1 for Nginx for high loads. Ask me about using it as a reverse proxy. I use it as the front-end on everything I do now. I use it to serve MediaWiki (static files + PHP execution) as well as a reverse proxy to e.g. Wordpress hosted by Apache (couldn't be bothered to make Nginx host it directly).

A really cool thing Nginx supports is caching PHP responses (FastCGI cache), which works great especially if the PHP code produces the appropriate HTTP headers for front-end caching aka "CDN" caching. (Mostly the Cache-Control header IIRC.) So on subsequent requests, Nginx will look up the response from disk instead of calling to the PHP-FPM process again, saving on IPC cost and PHP execution time. And if your system's memory isn't filled with other stuff, the disk cache will of course keep all that in memory, so you're basically using in-memory caching of web responses. I go a step further and put the FastCGI cache into /dev/shm so it won't be purged easily from memory and saves disk I/O.
Author Public Key
npub1uzcsm7540llpxa2mk3ajkcz8r62sghjkveqjvnq2xcykhfuxfxtq77hsyy