Web Caching ???????????????????????????????????????????????????????????????????????????????????????????? ?????????? Proxy Server ???????????????????????????????????????? Proxy Server
????
???????????????????????????? web caching ??????? ? ?????????????????????????????? web caching ??????????????? Browser ???? ??????????????????????????????????????????????????????? ? ??????????? web ???????????????????? disk ????????????????????????????? back ????????????????????????????????????????????? ???????????????????????????????????????????????????????????????? Web Server ??? ????????????????????? caching ???????? (first level of caching)
????????????????????? caching ???????????????????????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????????????????????? origin server ??? ??????????????????????????????????????????????????? (common place) ??? ?????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????? 50-100 ??????? ????? caching ??????????????????????? 60% ??? URL ???????????? local cache
?????????????????? browser cache ??? proxy-cache server ????? browser cache ????????? cache ?????????????????????????????????????????? final user workstation ???????? proxy-cache ???????????????????????????????????????????? web browser clients ????????????? client ????????????????????????????????????????????????????????? ???? proxy-cache server ?????? common server ?????????????????????? local network ??? Internet ??? browser ???????????????????????? proxy server ?????? 1 ???????????????? proxy-cache server ???????

?????? 1 Proxy-cache Server Network Configuration
proxy-cache ???????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????? ????????????? proxy-cache ???????? Server ??? browser ?????? clients ???????????????? ?????????????????????? client ?????????????????????????????????? ??? Server ?????????????? 2 network interfaces ???????????????? internal network ??? external network ???????????????????????? Internet ????????????????????? external network ???????? ?????? 2 ????????????????????? ???????????? proxy-cache server ?????? ???????????????????????????????????????????????????????? caching ???

?????? 2. Proxy-cache Network Configuration with Firewall
Multi-Level Web Caching
?????????????????????????????????? Web Caching ????????????????????????????????? (cache hierarchy) ???????????????????????????????????????????????????????????????? proxy-cache server ??????? 2 ????????? ??? proxy-cache ????? ? ???????????????????????????????????????????????????? ?????????????????????????????????? (network topology) , ????????? ISP ??????????????? ???? cache ??????????????????? (neighor(sibling) cache) ???????????????? document ???????????????????????????????????? ???? cache ??????????????????????? (parent cache) ????????????????????????????????????????? cache ??????? ? ??????????????????????????????????????? (Source) ?????????????? cache ????????????????????????? parent ????????????????? ?????? neighbor cache ?????????????????????????? ??? parent cache ????????????????????????????????? document ??? cache ??????????????????????
???????? cache topology ?????????????????????????????????????????????????????????? ??????????? ? ????????????????????????? sibling cache ??????????????????? ???????? parent cache ?????????? parent cache ??????????????????????????????????????????????? ???? parent cache ??????????????????????????????????????? document ??? parent cache ????????????????????????????????? ISP ??????????????????? sibling cache ???? parent cache ?????????????????????? ISP ??????????????????????????? (overload) ????????? link ??? ??????????????????????? web ???????????????????????? IP traffic ?????? ????? web caching ????????????????????? application-level, ???????????????? ??????? ICP (Internet cache protocol) ???????????????? ??????????? ???????????????????? multi-level web caching ????????

?????? 3. Multi-level Web Caching Organization
ICP ???????
ICP (Internet Cache Protocol) ????????????????????????????????????????? web caches ???? lightweight protocol ?????????????????? UDP ??? ICP ????????????????????????? web object ?? cache ???????????????? (neighboring caches) ?????????? object ??????? cache ???????????????? TCP-based HTTP protocol ???????????????????? object ????????????????????????????????????????????
?? cache ????? ? ????????????????????????????????????? object ??? cache ????? ICP request packet ????? sibling cache ??? parent cache ?????? ???? cache ???????????? ??? ICP ????????????? HIT code ???? MISS code ???? HIT ??????? cache ???????? object ????????????????????? ???? MISS ???????????? object ?????????? ??????? cache ????????????????????????????????? object ??????????????????????????????????????????????????????? ? ???? round-trip time ?????????????????????????? ????????????????????????????????? HTTP ????? cache ?????? ??? cache ????????????? MISS packet ??? cache ??????????????????????????????? document ??? parent cache ????????????????????????? ICP (ICP request/reply exchange) ??????????????????????? ? ??????????????????????????? (latency time) ?????? browser ??????????????????????????????????????????
??? object ???????????????? ICP ????????????????? object ??????????????????????? ICP HIT reply ????????? HTTP redirect ???????????????????????????????? ????????? ICP ??????????????????????????????????????????? multi-level cache ????????????? sibling cache ??? parent cache ???????? ????????????? ICP ?????????????????????????????????????? 1 ??? 2 ??????????? cache ?????????????????????????? cache ??????????? document ??? higher-lever cache ???????????? ??????? ICP ????????????????? overhead ????????
????? Multi-level Web Caching ?? Squid
?? Squid ??????????? Multi-level Web Caching ??????????????????????? /etc/squid/squid.conf ?????????????????????????? "cache_peer" ???? ????? cache_peer ?? 2 ??????
1. Parent Cache ???? cache ????????? get ????????? cache ????????????????????????????????????????? get ??????????????? (source) ??? ?????????????????? cache ????????????? source ???? ? ??????????????????????????????????????????? Parent cache ?????? ?????? cache ?????????????????????? (neighbor) ??????? ????????? cache ?????????????????????????????????????? get ????????? cache ?????????????????????????????
2. Sibling Cache (????????????? neighbor) ???? cache ??????????????????????????????????????????????????????? ??????? ????????????????????????????????????????????????????????????????
????????????????????? cache_peer ????????????:
cache_peer hostname type http_port icp_port
?????????????????????
cache_peer parent.foo.net parent 3128 3130 [proxy-only]
cache_peer sib1.foo.net sibling 3128 3130 [proxy-only]
cache_peer sib2.foo.net sibling 3128 3130 [proxy-only]
Source: ITWizard.info |