开发者

Is reverse proxy worth it if website requires login?

开发者 https://www.devze.com 2023-02-01 06:55 出处:网络
Considering a website that requires user authentication, all pageshave a \"welcome username\" string that is different for each user (like most of the websites these days)

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号