Considering a website that requires user authentication, all pages have a "welcome username" string that is different for each user (like most of the websites these days)
The application is caching different page components and sets correct last-modified headers also static content is served by a different machine using nginx.
I think a reverse proxy in this case will slow down the website, is this assumption wrong and I'm missing somethi开发者_StackOverflow社区ng here, could the reverse proxy still improve performance?
You could serve your custom content ("Hello [user]") via json/javascript. In this manner, the load on the dynamic part of your server is simple - "What's my username?" rather then "Customise the homepage for user x".
This has been covered in other threads, for example: https://serverfault.com/questions/87953/what-are-the-pros-and-cons-of-using-http-for-web-server-communication-with-app-se
精彩评论