当前位置:首页 > 报告详情

缓存的艺术:使用 Fastly 和 Varnish 加速 Ibexa 网站.pdf

上传人: 芦苇 编号:651756 2025-05-01 23页 1.57MB

1、The Art of CachingAccelerating Ibexa sites with Fastly and VarnishVIDAR LANGSEIDVidar LangseidSenior Support Software EngineerIbexaMeWhat is HTTP Cache anywayHTTP Cache refers to an integrated reverse proxy,one you controlTypically,located between the public Internet and the application serverIt cac

2、hes HTTP responses from the backend server(origin)future requests for the same resource can be handled without contacting backend serverIn principle,this would be quite easy if:all pages would look the same for every userpages/content would never change OR they would expire at predictable timesWebBr

3、owserHTTPCacheWebServer(origin)WebBrowserHTTPCacheWebServer(origin)#1#2Supported HTTP cachesSymfony Reverse ProxyEnabled by default in Ibexa DXPFor development purposesVarnishOpensource applicationFastly is a CDN serviceImplementation based on varnishPoP(Point of Presence)all over the worldhttps:/ H

4、TTP caches and their supported featuresSymfony reverse proxyVarnishStale CacheESIFastlyStale cacheESIShielding(https:/ Optimizer(https:/doc.ibexa.co/en/latest/content_management/images/fastly_io/)Configuring Varnish/FastlyVCL Varnish Configuration LanguageVCL files(ez_main.vcl,varnish6.vcl etc.)are

5、organized into subroutines.Naming of the subroutines varies a bit between Varnish and FastlyFeature:Stale Cache Deliver stale(outdated)data until cache has been updated Deliver stale data if origin is unavailableFeature:User context aware(user permission aware)Solution:Get the user context hash(iden

6、tify user based on roles and permissions)Resources:https:/foshttpcachebundle.readthedocs.io/en/latest/features/user-context.html#how-it-workshttps:/doc.ibexa.co/en/latest/infrastructure_and_maintenance/cache/http_cache/context_aware_cache/#context-aware-http-cacheBrowserHTTP-CacheOriginGET /Response

word格式文档无特别注明外均可编辑修改,预览文件经过压缩,下载原文更清晰!
三个皮匠报告文库所有资源均是客户上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作商用。
本文主要介绍了HTTP缓存的概念,以及如何在Ibexa DXP中实现HTTP缓存。HTTP缓存是一个集成化的反向代理,位于公共互联网和应用服务器之间,可以缓存后端服务器的HTTP响应,减少对后端服务器的访问。Ibexa DXP支持多种HTTP缓存,如Symfony反向代理、Varnish和Fastly。其中,Varnish是一个开源应用程序,而Fastly是一个CDN服务。Ibexa DXP还支持用户上下文感知缓存和内容感知缓存。用户上下文感知缓存通过获取用户上下文哈希值,识别基于角色和权限的用户,从而为用户提供个性化的缓存数据。内容感知缓存则通过分配不同的缓存标签,实现对相关内容的分组和处理。此外,本文还介绍了如何使用ESI(边缘侧包含)技术,将网页中需要单独缓存的部分分离出来,以及Fastly的Shielding(保护)功能,实现对不同地区用户的个性化服务。
"HTTP缓存是什么?" "如何使用Varnish和Fastly加速Ibexa站点?" "ESI(边缘侧包含)如何工作?"
客服
商务合作
小程序
服务号
折叠