Often, developers will seek to rectify a system's architectural issues at the software development level. While this has use cases, I am a huge fan of seeking to avoid this practice where it is not necessary. Moving issues from the software architecture layer to the infrastructure layer has its advantages.
For example, suppose you need to proxy a request for a particular URL endpoint off to another server. I believe this is best done at the web server level as opposed to writing a PHP proxy script. Apache and Nginx can both handle reverse proxying, but writing a library to do this may mean you come up against several unheard issues. Have you thought you that you'll handle HTTP PUT
/DELETE
requests? What about error handling? Assuming you nail your library, what about performance? Can a PHP proxy script really be faster than a web server level proxy, utilizing a web server written in a low-level systems engineering language? Surely one or two lines in your...