Pushpendra Singh Chauhan Posted September 1, 2022 Posted September 1, 2022 (edited) Hi, We are a self hosed community. My organization want to configure the complete website to use a commercial CDN (AKAMAI) so that site would be available on massive load (10 million Hits). We tried to move on CDN but could not succeed. the site was working for guests but login, downloads and db pages were not working properly. As I can see in storage setting there is storage setting to change the uploads folder path if you are using CDN. By this CDN will serve all CSS/JS/Files/Images. But what if I want to configure complete website eg. Pages, Downloads, Gallery. Is there a way to cache the complete website on CDN? Please help Edited September 1, 2022 by Pushpendra Singh Chauhan
Pushpendra Singh Chauhan Posted September 1, 2022 Author Posted September 1, 2022 Hi I want to add here that Guests can only read content and download files/images. There is no interaction for guests. We have a limited members within organization they only update/upload the content.
Marc Posted September 1, 2022 Posted September 1, 2022 The only way this would really break is if the content is not available on your CDN location. Have you checked to ensure you have copied everything over correctly, and that any further content is also being copied over by your CDN provider (or whatever method you are using to copy them)?
Randy Calvert Posted September 1, 2022 Posted September 1, 2022 Caching static files such as images, style sheets, etc is fairly straightforward. The problem with trying to cache the base pages themselves is that you have to build an Akamai property manager condition that reads the cookie value of being logged in or not. If the user is not logged in, allow content to be cached. If you’re using friendly URLs, this gets harder though. You can’t just match to say .php files since those are not used when using furls. You would need to build match conditions for paths such as /topic/ or text content type. In addition, remember to keep the cache time low… 1-5 min max for those page matches.
Pushpendra Singh Chauhan Posted September 1, 2022 Author Posted September 1, 2022 (edited) 23 minutes ago, Randy Calvert said: Caching static files such as images, style sheets, etc is fairly straightforward. The problem with trying to cache the base pages themselves is that you have to build an Akamai property manager condition that reads the cookie value of being logged in or not. If the user is not logged in, allow content to be cached. So I need to ask CDN provider to build a property to that reads the cookie value of logged in or not. Do i need to change in cookies at website level? 23 minutes ago, Randy Calvert said: If you’re using friendly URLs, this gets harder though. You can’t just match to say .php files since those are not used when using furls. You would need to build match conditions for paths such as /topic/ or text content type Yes we are using friendly URLs. Edited September 1, 2022 by Pushpendra Singh Chauhan
Pushpendra Singh Chauhan Posted September 1, 2022 Author Posted September 1, 2022 2 hours ago, Marc Stridgen said: The only way this would really break is if the content is not available on your CDN location. Have you checked to ensure you have copied everything over correctly, and that any further content is also being copied over by your CDN provider (or whatever method you are using to copy them)? The CDN provider copied the complete folder under www/html/ All pages were appearing with images but functionality was broken like on downloads the download file button was not working. I was logged in before moving to CDN so it was showing me logged in but when I tried to login from different browser, login page was not working. What should I and CDN provider do so that db driven activities pages download,login etc would work too
Jim M Posted September 1, 2022 Posted September 1, 2022 As mentioned in your first post, we support caching static resources (images, CSS, Javascript, etc...) through the storage configuration so long as your CDN has it's own internal sync'ing. Caching the whole website is getting to be outside our scope of support as this is leaning more towards hosting and CDN providers than really the software. As Randy mentioned, there is a degree of complexity here that we can't really assist with on the CDN side but if there are questions on our software side how to do things which your CDN may require, we can answer that. Alternatively, I can move this to the Community Support forum if you require more guidance on the CDN side of things. Just now, Pushpendra Singh Chauhan said: All pages were appearing with images but functionality was broken like on downloads the download file button was not working. I was logged in before moving to CDN so it was showing me logged in but when I tried to login from different browser, login page was not working. What should I and CDN provider do so that db driven activities pages download,login etc would work too You would need to ask your CDN provider if they support dynamic websites that have authenticated sessions. You will need to ensure you are not caching data, whole pages, and sessions which are session specific. It is not as simple as throwing static resources over to a CDN and asking them to cache and display everything.
Pushpendra Singh Chauhan Posted September 1, 2022 Author Posted September 1, 2022 4 minutes ago, Jim M said: Alternatively, I can move this to the Community Support forum if you require more guidance on the CDN side of things. Pls move this. So that I may get more inputs
Recommended Posts