JP2004264956A - Method for managing cache, and cache server capable of using this method - Google Patents

Method for managing cache, and cache server capable of using this method Download PDF

Info

Publication number
JP2004264956A
JP2004264956A JP2003052579A JP2003052579A JP2004264956A JP 2004264956 A JP2004264956 A JP 2004264956A JP 2003052579 A JP2003052579 A JP 2003052579A JP 2003052579 A JP2003052579 A JP 2003052579A JP 2004264956 A JP2004264956 A JP 2004264956A
Authority
JP
Japan
Prior art keywords
cache
server
deleted
metrics
cache server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003052579A
Other languages
Japanese (ja)
Inventor
Michimitsu Hattori
進実 服部
Minoru Nakazawa
実 中沢
Tensei Ko
天成 胡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
PFU Ltd
Kanazawa Institute of Technology (KIT)
Original Assignee
PFU Ltd
Kanazawa Institute of Technology (KIT)
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by PFU Ltd, Kanazawa Institute of Technology (KIT) filed Critical PFU Ltd
Priority to JP2003052579A priority Critical patent/JP2004264956A/en
Publication of JP2004264956A publication Critical patent/JP2004264956A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To increase the efficiency of a proxy cache for an entire network. <P>SOLUTION: The metrix accumulating part 65 of an upper cache server 20 receives a report on the number of times that an object to be deleted at a lower cache server 22 is referred to, and adds to the number of times that the metrix management entry 55 of a cache buffer 52 is referred to. Based on the cumulative number of times that the object to be deleted is referred to, an evaluating part 66 determines whether or not the object is to be cached. Based on the determination result, a cache movement control part 62 receives data on the object from the lower cache server 22. A cache management part 60 stores the received data on the object in a cache object storage part 58 as a new cache object 56, and newly provides a cache entry 54 for management. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
この発明はキャッシュ技術、とくにネットワークにおけるキャッシュ管理方法およびその方法を利用可能なキャッシュサーバに関する。
【0002】
【従来の技術】
インターネットでWWW(World Wide Web)によるサービスを提供する際、サーバやルータの処理能力、通信回線の帯域幅などに制限があるため、プロキシキャッシュサーバをネットワーク上に設け、クライアントのWebオブジェクトに対するアクセス要求を代理するとともに、アクセスされたオブジェクトを一時的に保持して、処理性能を確保することが一般的に行われている。クライアントがサーバにアクセスしてオブジェクトを取得したとき、プロキシキャッシュサーバにそのオブジェクトのキャッシュデータが保持される。プロキシキャッシュサーバは、クライアントから再度同じオブジェクトに対する要求があったとき、サーバにアクセス要求を送る代わりに、そのキャッシュデータをクライアントに送信する。これによりサーバやルータにかかる負荷を軽減し、ネットワークトラフィックを削減して、ネットワークリソースの利用効率を向上させるとともに、サービスの応答時間の改善を図ることができる。
【0003】
プロキシキャッシュの利用効率を高めるためには、オブジェクトをキャッシュするために十分な記憶容量をもった大規模記録装置が必要になる。ブロードバンドのネットワークが普及するにつれて、映像や音楽など容量の大きいコンテンツの利用が盛んになるため、プロキシサーバにおいて記録装置を増設するだけでは対応しきれず、プロキシキャッシュの効率的な運用がより一層求められる。
【0004】
プロキシキャッシュの性能は、キャッシュのエントリの置換ポリシーに大きく左右される。新たなオブジェクトをキャッシュするためのメモリスペースを確保するためには、既にキャッシュされているオブジェクトを削除しなければならない。キャッシュオブジェクトのメトリックスを何らかの方法で評価して、どのキャッシュオブジェクトを削除するのが効率的であるかを決めるのが置換ポリシーである。プロキシキャッシュの効率化のために、最終アクセス時刻、アクセス頻度、オブジェクトサイズなどのメトリックスを用いた、さまざまな置換ポリシーが検討されている(たとえば、非特許文献1参照)。
【0005】
【非特許文献1】
G. Barish and K. Obraczka, ”World Wide Web caching: Trends and techniques,” IEEE Commun. Mag., vol.38, no.5, pp.178−184, May 2000.
【0006】
【発明が解決しようとする課題】
これまで提案されているプロキシキャッシュの置換ポリシーは、1つのプロキシキャッシュサーバ内のローカルなプロキシキャッシュに対して作用するものであり、プロキシキャッシュサーバが自分のキャッシュオブジェクトにはもはや利用価値がないと判断した時点で、そのキャッシュオブジェクトは直ちにキャッシュメモリから削除される。しかしながら、キャッシュオブジェクトの利用価値は、本来はネットワーク全体において評価すべきものである。オブジェクトのアクセス時間を短縮し、ネットワークトラフィックを削減するためには、オブジェクトのキャッシュをネットワーク上に適切に分散させる必要があり、個々のプロキシキャッシュサーバ内のローカルな置換ポリシーだけに頼っていては、プロキシキャッシュの性能を十分に引き出すことはできない。
【0007】
本発明はこうした状況に鑑みてなされたものであり、その目的は、キャッシュオブジェクトの利用効率を向上することのできるキャッシュ管理方法、およびその方法を利用可能なキャッシュサーバを提供することにある。
【0008】
【課題を解決するための手段】
本発明のある態様はキャッシュ管理方法に関する。この方法は、階層的に構成されたキャッシュサーバのネットワークにおいて、下位階層の複数のキャッシュサーバにキャッシュされるオブジェクトのメトリックスを上位階層の少なくとも1つのキャッシュサーバにおいて累積評価し、下位階層のキャッシュサーバの1つにおいてキャッシュオブジェクトが削除されるとき、累積評価されたメトリックスに応じて、その削除されるキャッシュオブジェクトを下位階層のキャッシュサーバから上位階層のキャッシュサーバに転送してキャッシュするかどうかを決定する。ここで、サーバからクライアントに提供されるオブジェクトのネットワーク経路上で、クライアント側を下位、サーバ側を上位とし、ネットワーク経路上のキャッシュサーバの相対的な位置関係により、キャッシュサーバの階層の上下関係を定めることができる。
【0009】
下位階層のキャッシュサーバがキャッシュオブジェクトを削除するときに限り、上位階層のキャッシュサーバにおいてそのキャッシュオブジェクトのメトリックスが累積されるようにしてもよい。これにより、下位階層のキャッシュサーバでオブジェクトが削除される前にメトリックスを上位階層のキャッシュサーバで累積することができる。また、メトリックスの累積を下位階層のキャッシュサーバで削除されるキャッシュに限ったことにより、下位階層のキャッシュサーバでキャッシュされている多数のオブジェクトについてメトリックスを累積することを避け、キャッシュサーバ間の通信量を最小限に抑えることができる。また、下位階層のキャッシュサーバでキャッシュオブジェクトが削除されるタイミングに限ってメトリックスを累積するため、メトリックスの累積漏れが起きたり、重複加算が起きるのを防ぐことができる。
【0010】
上位階層のキャッシュサーバにおいては、累積評価されたメトリックスにもとづく置換ポリシーにしたがってキャッシュオブジェクトが管理されてもよい。累積されたメトリックスを用いることにより、上位階層のキャッシュサーバを経由してオブジェクトが提供される複数のクライアント全体で、オブジェクトに対するアクセス状況を考慮し、キャッシュの置換ポリシーを実現することができる。
【0011】
本発明の別の態様はキャッシュサーバに関する。このキャッシュサーバは、階層的に構成されたキャッシュサーバのネットワークにおいて、相対的に見て下位階層にあるキャッシュサーバであり、クライアントへ提供されるオブジェクトをキャッシュして保持するキャッシュ記憶部と、所定のメトリックスにもとづく置換ポリシーにしたがってキャッシュオブジェクトの管理を行うキャッシュ管理部と、前記置換ポリシーにしたがって削除されるキャッシュオブジェクトのメトリックスに限り、上位階層のキャッシュサーバに通知するメトリックス通知部と、前記上位階層のキャッシュサーバから送信要求があった場合に、その削除されるキャッシュオブジェクトを前記上位階層のキャッシュサーバに移動させる移動制御部とを含む。
【0012】
本発明のさらに別の態様もキャッシュサーバに関する。このキャッシュサーバは、階層的に構成されたキャッシュサーバのネットワークにおいて、相対的に見て上位階層にあるキャッシュサーバであり、クライアントへ提供されるオブジェクトをキャッシュして保持するキャッシュ記憶部と、下位階層にある複数のキャッシュサーバから通知されるキャッシュオブジェクトのメトリックスを累積してオブジェクト毎にトータルメトリックスを算出するメトリックス累積部と、前記トータルメトリックスにもとづく置換ポリシーにしたがって前記キャッシュ記憶部に保持されたキャッシュオブジェクトの管理を行うキャッシュ管理部と、下位階層のキャッシュサーバから削除されるキャッシュオブジェクトの通知を受けた場合に、前記トータルメトリックスにもとづいてその削除されるキャッシュオブジェクトを保持するかどうかを決定する評価部と、前記評価部がその削除されるキャッシュオブジェクトを保持すると決定した場合、下位階層にあるキャッシュサーバからその削除されるキャッシュオブジェクトを取得して、そのキャッシュオブジェクトを前記キャッシュ管理部に新たに管理させる移動制御部とを含む。
【0013】
前記メトリックス累積部は、下位階層のキャッシュサーバがそのキャッシュサーバの置換ポリシーにしたがってキャッシュオブジェクトを削除する際に、そのキャッシュオブジェクトのメトリックスの通知を受け、前記トータルメトリックスに累積してもよい。
【0014】
本発明のさらに別の態様はコンピュータプログラムに関する。このプログラムは、下位階層にある複数のキャッシュサーバの各々からキャッシュオブジェクトの削除時に通知される当該キャッシュオブジェクトのメトリックスを累積してオブジェクト毎にトータルメトリックスを算出するステップと、下位階層のキャッシュサーバから削除されるキャッシュオブジェクトの通知を受けて、前記トータルメトリックスにもとづいてその削除されるキャッシュオブジェクトを保持するかどうかを決定するステップと、その削除されるキャッシュオブジェクトを保持すると決定した場合、下位階層にあるキャッシュサーバからその削除されるキャッシュオブジェクトを取得するステップと、取得されたキャッシュオブジェクトを前記トータルメトリックスにもとづく置換ポリシーにしたがって管理するステップとをコンピュータに実行させる。
【0015】
なお、以上の構成要素の任意の組合せ、本発明の表現を方法、装置、サーバ、システム、コンピュータプログラム、記録媒体などの間で変換したものもまた、本発明の態様として有効である。
【0016】
【発明の実施の形態】
図1は、実施の形態に係るキャッシュサーバを含むネットワーク全体の構成図である。クライアント10a〜10c(以下、これらを総称するときはクライアント10と呼ぶ)は、インターネット経由で、サーバ14a、14b(以下、これらを総称するときはサーバ14と呼ぶ)が提供するWebページや画像、オーディオなどのオブジェクトにアクセスする。
【0017】
インターネットに配置された複数のキャッシュサーバ12a〜12eは、クライアント10からサーバ14へのオブジェクトのアクセス要求を代理するプロキシサーバとしての機能をもち、サーバ14から取得したオブジェクトのデータを中継してクライアント10へ提供するとともに、そのオブジェクトのデータを将来の使用に備えて一時的にキャッシュする。
【0018】
これらのキャッシュサーバ12a〜12eは、サーバ14a、14bからクライアント10a〜10cに至るネットワークの経路上で階層構造を成し、クライアント10a〜10cがアクセスしたオブジェクト#1〜#4のデータをキャッシュする。たとえば、クライアント10aがサーバ14aにオブジェクト#2のアクセス要求を送ると、まずクライアント10aに最も近い位置にあるキャッシュサーバ12bがオブジェクト#2のアクセス要求を代理し、そのキャッシュサーバ12bから見て上位にあるキャッシュサーバ12aに対してオブジェクト#2を要求する。すなわち、ここで下位のキャッシュサーバ12bと上位のキャッシュサーバ12aは、クライアントとサーバの関係に立つ。
【0019】
さらに、上位のキャッシュサーバ12aは、オブジェクト#2のキャッシュがあれば、そのキャッシュデータを下位のキャッシュサーバ12bに返信するが、そうでなければ、上位のキャッシュサーバ12aは、自身がクライアントとしてサーバ14aにオブジェクト#2のアクセス要求を送ることになる。上位のキャッシュサーバ12aはサーバ14aからオブジェクト#2のデータを受信し、キャッシュオブジェクト16aとしてキャッシュするとともに、下位のキャッシュサーバ12bにそのデータを返信する。
【0020】
下位のキャッシュサーバ12bは、上位のキャッシュサーバ12aからオブジェクト#2のデータを受信して、キャッシュオブジェクト16bとしてキャッシュするとともに、そのデータをクライアント10aに返信する。
【0021】
その後、別のクライアント10cがサーバ14aに同じオブジェクト#2のアクセス要求を送ると、このクライアント10cに最も近い位置にある第1階層のキャッシュサーバ12eがオブジェクト#2のアクセス要求を代理し、1つ上の階層のキャッシュサーバ12cに対してオブジェクト#2を要求する。この第2階層のキャッシュサーバ12cは、オブジェクト#2のキャッシュがなければ、さらに1つ上の階層のキャッシュサーバ12aに対してオブジェクト#2のアクセス要求を送る。この第3階層のキャッシュサーバ12aには、既にオブジェクト#2のキャッシュオブジェクト16aがあるため、第2階層のキャッシュサーバ12cにそのデータを返信する。第2階層のキャッシュサーバ12cは、オブジェクト#2のデータをキャッシュオブジェクト16cとしてキャッシュするとともに、第1階層のキャッシュサーバ12eにそのデータを返信する。第1階層のキャッシュサーバ12eは、受信したオブジェクト#2のデータをキャッシュオブジェクト16eとしてキャッシュするとともに、そのデータをクライアント10cに返信する。
【0022】
このようにして第1階層のキャッシュサーバ12eにキャッシュされたキャッシュオブジェクト16eは、そのキャッシュサーバ12e内のキャッシュの置換ポリシーにしたがって管理され、他のオブジェクトを新しくキャッシュする際に置き換えられて削除されることがある。キャッシュサーバ12a〜12eはそれぞれ、これから述べるメトリックスにもとづく置換ポリシーにしたがって、キャッシュオブジェクトを管理する。
【0023】
図2は、実施の形態に係るキャッシュサーバによるキャッシュオブジェクトのメトリックスの評価方法を説明する図である。同図の例では、クライアント10a〜10cのサーバ14a、14bに対するオブジェクトのアクセス要求は、それぞれ下位キャッシュサーバ22a〜22cにより代理され、さらに下位キャッシュサーバ22a〜22cから上位キャッシュサーバ20にオブジェクトのアクセス要求がなされる。上位キャッシュサーバ20はサーバ14a、14bからオブジェクトを受信してキャッシュするとともに、下位キャッシュサーバ22a〜22cに対してはサーバとして動作して、オブジェクトを下位キャッシュサーバ22a〜22cへ返信する。同図において、オブジェクト#1〜#4のキャッシュの右肩に付された数字は、各キャッシュオブジェクトのキャッシュサーバ20、22a〜22c内でのローカルな参照回数を示しており、キャッシュサーバ20、22a〜22cはそれぞれ、この参照回数をメトリックスとして用いた置換ポリシーによりキャッシュオブジェクトを管理する。
【0024】
2つの下位キャッシュサーバ22a、22bがそれぞれオブジェクト#2のキャッシュオブジェクト18a、18bを格納しているが、オブジェクト#2のキャッシュオブジェクト18a、18bの参照回数はいずれも4回であり、他のキャッシュオブジェクトの参照回数よりも少ない。しかし、ネットワーク全体で見た場合、オブジェクト#2のキャッシュの参照回数は合計で8回であり、他のキャッシュオブジェクトの参照回数よりも多い。
【0025】
ここで、2つの下位キャッシュサーバ22a、22bはそれぞれ、新たなオブジェクトをキャッシュするスペースを確保するために、参照回数の少ないキャッシュオブジェクト18a、18bを削除すると仮定する。上位キャッシュサーバ20は、2つの下位キャッシュサーバ22a、22bのそれぞれからオブジェクト#2のキャッシュオブジェクト18a、18bの参照回数の通知を受けて参照回数を累積し、合計で8回の参照回数であることをオブジェクト#2のトータルメトリックスとして記憶する。
【0026】
上位キャッシュサーバ20は、オブジェクト#2のキャッシュオブジェクト19をこのトータルメトリックスにもとづいた置換ポリシーにしたがって管理するため、下位キャッシュサーバ22a、22bにおいてオブジェクト#2のキャッシュオブジェクト18a、18bがローカルなメトリックスの評価によって削除されても、上位キャッシュサーバ20において、オブジェクト#2のキャッシュオブジェクト19が保持される。もっとも、上位キャッシュサーバ20において、他に参照回数の多いオブジェクトがあれば、オブジェクト#2のキャッシュオブジェクト19もやがては削除されることがある。このようにして、オブジェクト#2のキャッシュの削除は下位階層から上位階層のキャッシュサーバに向けて徐々に行われることになり、ちょうどオブジェクト#2のキャッシュの生成が上位階層から下位階層のキャッシュサーバに伝搬するのと対照を成す。
【0027】
同様に、別のクライアント10cを代理する下位キャッシュサーバ22cにおいて、オブジェクト#3のキャッシュオブジェクト17cが置換ポリシーにしたがって削除されるときは、このキャッシュオブジェクト17cの参照回数6回と、もう一つのクライアント10aを代理する下位キャッシュサーバ22aに格納されているオブジェクト#3のキャッシュオブジェクト17aの参照回数5回とが、上位キャッシュサーバ20において累積され、トータルメトリックスとして11回の参照回数をもつものとして、上位キャッシュサーバ20において管理される。
【0028】
図3は、下位キャッシュサーバ22の構成図であり、図4は、上位キャッシュサーバ20の構成図である。これらの構成は、ハードウエア的には、任意のコンピュータのCPU、メモリ、その他のLSIで実現でき、ソフトウエア的にはメモリにロードされたキャッシュ管理機能のあるプログラムなどによって実現されるが、ここではそれらの連携によって実現される機能ブロックを描いている。したがって、これらの機能ブロックがハードウエアのみ、ソフトウエアのみ、またはそれらの組合せによっていろいろな形で実現できることは、当業者には理解されるところである。
【0029】
図3を参照して、下位キャッシュサーバ22の構成を説明する。下位キャッシュサーバ22には、キャッシュバッファ32が設けられ、キャッシュされるオブジェクトのエントリ34(以下、単にキャッシュエントリ34と呼ぶ)がリスト構造などで格納される。キャッシュエントリ34にはオブジェクトのキャッシュデータ36(以下、単にキャッシュオブジェクト36と呼ぶ)へのポインタが含まれ、キャッシュオブジェクト36そのものは大容量記憶装置であるキャッシュオブジェクト記憶部38に記憶される。
【0030】
キャッシュエントリ34のデータ構造を図5に示す。キャッシュエントリ34には、オブジェクトのサーバ14における格納場所を示すURL70、下位キャッシュサーバ22内での当該キャッシュの参照回数72、キャッシュの最終アクセス時刻74、キャッシュのアクセス頻度76、キャッシュオブジェクトのサイズ78、およびキャッシュオブジェクトへのポインタ80が格納される。
【0031】
図3に戻り、検索部30は、クライアント10から要求のあったオブジェクトについて、キャッシュバッファ32のキャッシュエントリ34のリスト構造を検索して、そのオブジェクトがキャッシュされているかどうかを調べる。オブジェクトの検索キーとして図5のURL70が用いられる。キャッシュにヒットした場合、検索部30はヒットしたキャッシュエントリ34のポインタ80が指すキャッシュオブジェクト36をキャッシュオブジェクト記憶部38から取り出し、クライアント10へ送信する。
【0032】
キャッシュ管理部40は、キャッシュバッファ32に格納されたキャッシュエントリ34毎に付与されたメトリックスを参照して、メトリックスにもとづいた置換ポリシーにしたがって、キャッシュバッファ32に格納されたキャッシュエントリ34の管理を行う。たとえば、メトリックスとして図5の参照回数72を用い、参照回数72の最も少ないキャッシュエントリ34から先に追い出すLFU(Least Frequently Used)方式を置換ポリシーとして利用する。
【0033】
キャッシュ管理部40は、新たなオブジェクトをキャッシュするためのスペースがキャッシュオブジェクト記憶部38に必要になったとき、メトリックスが最も小さいキャッシュエントリ34を選んで、キャッシュオブジェクト記憶部38から削除するキャッシュオブジェクト36を決定する。キャッシュ管理部40は、その削除するキャッシュオブジェクト36のメトリックスをキャッシュバッファ32から読み出して、メトリックス通知部44に与える。
【0034】
メトリックス通知部44は、削除対象のキャッシュオブジェクト36のメトリックスを上位キャッシュサーバ20に通知する。キャッシュ移動制御部42は、上位キャッシュサーバ20から削除対象のキャッシュオブジェクト36の送信要求を受けた場合に限り、キャッシュオブジェクト記憶部38からそのキャッシュオブジェクト36を読み出して、上位キャッシュサーバ20へ転送する。
【0035】
キャッシュ管理部40は、キャッシュ移動制御部42による削除対象のキャッシュオブジェクト36の転送制御が終わったことを受け、キャッシュバッファ32からそのキャッシュオブジェクト36のキャッシュエントリ34を削除するとともに、キャッシュオブジェクト36をキャッシュオブジェクト記憶部38から削除する。
【0036】
図4を参照して、上位キャッシュサーバ20の構成を説明する。検索部50、キャッシュ管理部60、キャッシュオブジェクト記憶部58は、図3の下位キャッシュサーバ22の検索部30、キャッシュ管理部40、キャッシュオブジェクト記憶部38と同じ構成であるが、キャッシュバッファ52に格納されるエントリに違いがある。
【0037】
キャッシュバッファ52には、キャッシュオブジェクト記憶部58のキャッシュオブジェクト56に対応して設けられたキャッシュエントリ54以外に、メトリックス管理用エントリ55がある。メトリックス管理用エントリ55は、下位キャッシュサーバ22がキャッシュするオブジェクトのメトリックスの累積計算のために利用されるものであり、キャッシュオブジェクト記憶部58にはこれに対応するオブジェクトのキャッシュデータは格納されていない。
【0038】
キャッシュエントリ54は、図5で説明した下位キャッシュサーバ22のキャッシュエントリ34と同じデータ構造をもつが、参照回数72には下位キャッシュサーバ22から通知されるキャッシュオブジェクトの参照回数が累積加算され、トータルメトリックスとして利用される点が異なる。
【0039】
メトリックス管理用エントリ55のデータ構造を図6に示す。メトリックス管理用エントリ55には、オブジェクトのURL82、累積参照回数84、オブジェクトサイズ86が格納される。このメトリックス管理用エントリ55のURL82で特定されるオブジェクトが上位キャッシュサーバ20においてもキャッシュされることとなった場合には、メトリックス管理用エントリ55は図5で説明したキャッシュエントリ34に置き換えられ、引き続いてキャッシュバッファ52内でキャッシュエントリ34として置換ポリシーにしたがった管理を受けることになる。
【0040】
したがって、下位キャッシュサーバ22においてキャッシュされているオブジェクトは、上位キャッシュサーバ20のキャッシュバッファ52内で、キャッシュエントリ54として管理されているか、メトリックス管理用エントリ55として管理されているか、あるいは、どちらにも該当しないかのいずれかである。また、キャッシュエントリ54として管理された場合には、キャッシュオブジェクト記憶部58にキャッシュオブジェクト56がキャッシュされるが、メトリックス管理用エントリ55として管理されている間は、キャッシュオブジェクト記憶部58には対応するキャッシュデータが存在しない。
【0041】
再び図4を参照し、検索部50が下位キャッシュサーバ22から要求されるオブジェクトを検索するときは、キャッシュバッファ52内のキャッシュエントリ54のみを検索して、ヒットした場合は、キャッシュオブジェクト記憶部58から対応するキャッシュオブジェクト56を取り出して下位キャッシュサーバ22へ送信する。また、キャッシュ管理部60は、キャッシュバッファ52内のキャッシュエントリ54のみをトータルメトリックスにもとづく置換ポリシーにしたがって管理する。
【0042】
メトリックス累積部65は、削除対象のオブジェクトのメトリックスの通知を下位キャッシュサーバ22から受けると、そのオブジェクトがキャッシュされている場合は、キャッシュエントリ54の参照回数72に通知されたメトリックスを累積加算する。そのオブジェクトがキャッシュされていない場合は、メトリックス管理用エントリ55の累積参照回数84に通知されたメトリックスを累積加算する。
【0043】
評価部66は、下位キャッシュサーバ22から削除対象のオブジェクトの通知を受けて、そのオブジェクトのURLを検索キーにして、キャッシュバッファ52内のキャッシュエントリ54またはメトリックス管理用エントリ55を検索し、そのオブジェクトの累積参照回数を取得する。削除対象のオブジェクトがメトリックス管理用エントリ55として存在する場合は、上位キャッシュサーバ20にはそのオブジェクトのデータがキャッシュされていないため、その削除対象のオブジェクトの累積参照回数にもとづいて、新たなキャッシュエントリ54としてキャッシュするかどうかを判断する。たとえば、他のキャッシュエントリ54の参照回数よりも大きい累積参照回数をもつならば、その削除対象のオブジェクトを受理し、そうでないなら、受理しない。また、キャッシュオブジェクト記憶部58に十分な空き容量がある場合は、累積参照回数を評価することなく、削除対象のオブジェクトを受理する。
【0044】
評価部66は判断結果をキャッシュ移動制御部62に通知し、キャッシュ移動制御部62は削除対象のオブジェクトを受理する場合には、下位キャッシュサーバ22にそのオブジェクトの送信要求を送り、下位キャッシュサーバ22からオブジェクトのデータを受信する。
【0045】
キャッシュ移動制御部62により受信されたオブジェクトのデータは、新たなキャッシュオブジェクト56としてキャッシュオブジェクト記憶部58に格納され、キャッシュ管理部60はこのキャッシュオブジェクト56に対するメトリックス管理用エントリ55をキャッシュエントリ54に置き換えてキャッシュバッファ52内で、置換ポリシーにしたがって管理する。
【0046】
図7から図9は、以上の構成の下位キャッシュサーバ22および上位キャッシュサーバ20によるキャッシュ管理手順を説明するフローチャートである。
【0047】
図7において、下位キャッシュサーバ22のキャッシュ管理部40が、置換ポリシーにもとづいて削除されるキャッシュオブジェクト36を決定する(S10)。キャッシュ管理部40は削除されるキャッシュオブジェクトを一時的にロックする(S12)。メトリックス通知部44は、削除されるキャッシュオブジェクト36に対応するキャッシュエントリ34のURL70とローカルなメトリックスである参照回数72を上位キャッシュサーバ20へ通知する(S14)。この通知には、階層的に構成されたキャッシュサーバ間の通信に利用されるICP(Internet Cache Protocol)を用い、下位キャッシュサーバ22は、標準的なICP_QUERYを拡張したICP_MOVE_QUERYメッセージにURL70と参照回数72の情報を格納して上位キャッシュサーバ20へ送信する(S16)。
【0048】
上位キャッシュサーバ20のメトリックス累積部65は、ICP_MOVE_QUERYメッセージを受信すると、ICP_MOVE_QUERYメッセージに含まれるURL70にもとづいてキャッシュバッファ52内のキャッシュエントリ54またはメトリックス管理用エントリ55を検索し、キャッシュエントリ54の参照回数72またはメトリックス管理用エントリ55の累積参照回数84に下位キャッシュサーバ22から通知されたローカルメトリックスである参照回数72を累積加算する(S18)。キャッシュバッファ52に該当するエントリがない場合は、下位キャッシュサーバ22から通知されたURL70と参照回数72にもとづいて新たにメトリックス管理用エントリ55が作成される。
【0049】
評価部66は、下位キャッシュサーバ22から通知された削除対象のオブジェクトがキャッシュされていない場合、すなわちキャッシュバッファ52内には削除対象のオブジェクトのエントリがメトリックス管理用エントリ55として格納されているだけである場合、そのメトリックス管理用エントリ55の累積参照回数84にもとづいて、削除対象のオブジェクトを受理して新たにキャッシュするかどうかを判断する(S20)。オブジェクトを受理する場合(S20のY)の処理の流れを図8に示し、オブジェクトを受理しない場合(S20のN)の処理の流れを図9に示す。
【0050】
図8を参照して、下位キャッシュサーバ22において削除されるオブジェクトを上位キャッシュサーバ20が受理する場合の処理を説明する。上位キャッシュサーバ20のキャッシュ移動制御部62は、下位キャッシュサーバ22に対して削除対象のオブジェクトの送信要求を行う(S22)。この送信要求は、下位キャッシュサーバ22から通知された削除対象のオブジェクトのURL70を用いたHTTP(Hypertext Transport Protocol)リクエストによって行われる(S24)。下位キャッシュサーバ22のキャッシュ移動制御部42は、削除されるキャッシュオブジェクト36を上位キャッシュサーバ20へ転送する(S26)。この転送は、HTTPリプライによって行われる(S28)。下位キャッシュサーバ22のキャッシュ管理部40は、削除対象のキャッシュオブジェクト36のロックを解除して、キャッシュオブジェクト記憶部38からそのデータを削除し、対応するキャッシュエントリ34をキャッシュバッファ32から削除する(S34)。
【0051】
上位キャッシュサーバ20のキャッシュ移動制御部62は、HTTPリプライにより転送されたオブジェクトのデータを受信する(S30)。キャッシュ移動制御部62は、受信したオブジェクトのデータを新たなキャッシュオブジェクト56としてキャッシュオブジェクト記憶部58に格納し、キャッシュ管理部60は、そのオブジェクトに対応するメトリックス管理用エントリ55を新たなキャッシュエントリ54に変更してキャッシュバッファ52内で管理する(S32)。
【0052】
図9を参照して、下位キャッシュサーバ22において削除されるオブジェクトを上位キャッシュサーバ20が受理しない場合の処理を説明する。上位キャッシュサーバ20のキャッシュ移動制御部62は、下位キャッシュサーバ22へICP_MOVE_NGメッセージを送信して削除対象のオブジェクトを受理できないことを伝える(S36)。下位キャッシュサーバ22のキャッシュ管理部40は、削除対象のキャッシュオブジェクト36のロックを解除して、キャッシュオブジェクト記憶部38からそのデータを削除し、対応するキャッシュエントリ34をキャッシュバッファ32から削除する(S38)。
【0053】
以上述べたように、本発明の実施の形態によれば、下位のプロキシキャッシュがローカルに評価するキャッシュのメトリックスを上位のプロキシキャッシュが統合して再評価するため、ネットワーク全体でキャッシュの利用頻度を考慮したキャッシュの置換ポリシーを実現することができる。それによって、キャッシュのヒット率を高め、またオブジェクトのアクセス時のレスポンス時間を改善することができる。
【0054】
また、実施の形態によれば、比較的限定された地域のクライアントからの利用頻度が高いオブジェクトのキャッシュは、その地域のクライアントに近い下位のプロキシキャッシュにもたせ、ある程度広い地域のクライアントの集合から利用されるオブジェクトのキャッシュについては、上位のプロキシキャッシュに移動してもたせることができるため、キャッシュの適正な分散配置により、ネットワーク負荷を分散することができる。
【0055】
また、下位のプロキシキャッシュが異なる管理ドメインに属していて、それらのプロキシキャッシュ間を連携することが政策的に困難な場合でも、管理ドメインをまたがって上位のプロキシキャッシュを設けることにより、上位階層でメトリックスの統合的な再評価をすることができるようになる。
【0056】
以上、本発明を実施の形態をもとに説明した。これらの実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。以下そのような変形例を説明する。
【0057】
上記の説明では、キャッシュオブジェクトの利用価値を表すメトリックスとして参照回数を用い、LFU方式を置換ポリシーとして採用したが、当然に参照回数以外の他のメトリックスを用いても本発明を実施することができる。また参照回数に他のメトリックスを組み合わせて置換ポリシーを実現してもよい。たとえば、参照回数以外に最終アクセス時刻やアクセス頻度もメトリックスとして評価して、最後に参照されてからの経過時間が最も長いキャッシュエントリを優先的に削除したり、アクセス頻度によりキャッシュの寿命を考慮するようにしてもよい。また、オブジェクトサイズをもとにキャッシュを削除するかどうかを判断してもよい。たとえばオブジェクトサイズの大きいキャッシュについては、アクセス時間がかかるため、できるだけ削除しないようにしたり、逆に記憶スペースを節約するために優先的に削除するようにしてもよい。
【0058】
また、下位のキャッシュサーバにおいては、参照回数を計数するのみで、置換ポリシーとしては、最終アクセス時刻をメトリックスとして用いたLRU(Least Recently Used)方式を採用してもよい。この場合、下位のキャッシュサーバは、LRU方式により置き換えられるキャッシュについて計数された参照回数を上位のキャッシュサーバに通知し、上位のキャッシュサーバは、累積された参照回数にもとづいた置換ポリシーでキャッシュを管理してもよい。このように、置換ポリシーは上位、下位のキャッシュサーバにおいて異なっていてもかまわない。
【0059】
なお、上記の説明では、上位キャッシュサーバと下位キャッシュサーバに分けて構成と動作を説明したが、上位キャッシュサーバに対してさらに上位のキャッシュサーバがある場合は、上位キャッシュサーバはそのさらに上位のキャッシュサーバに対しては下位キャッシュサーバとして動作することになる。したがって、上位キャッシュサーバに下位キャッシュサーバの構成をもたせるようにして、相対的にいずれのキャッシュサーバの機能も実行できるようにしてもよい。
【0060】
また、階層的に構成されたプロキシキャッシュのネットワークにおいて、下位キャッシュサーバは子プロキシキャッシュに、上位キャッシュサーバは親プロキシキャッシュに相当するのが通常の構成である。しかしながら、異なる親プロキシキャッシュに属する子プロキシキャッシュを下位キャッシュサーバとして、それらを統括する上位キャッシュサーバを設けてもかまわない。このように、プロキシキャッシュのネットワークにおける親子関係には限定されずに、上位、下位のキャッシュサーバを構成してもよい。
【0061】
【発明の効果】
本発明によれば、ネットワーク上でキャッシュを効率よく管理することができる。
【図面の簡単な説明】
【図1】実施の形態に係るキャッシュサーバを含むネットワーク全体の構成図である。
【図2】実施の形態に係るキャッシュサーバによるキャッシュオブジェクトのメトリックスの評価方法を説明する図である。
【図3】図2の下位キャッシュサーバの構成図である。
【図4】図2の上位キャッシュサーバの構成図である。
【図5】図3のキャッシュエントリのデータ構造の説明図である。
【図6】図4のメトリックス管理用エントリのデータ構造の説明図である。
【図7】図2の下位キャッシュサーバおよび上位キャッシュサーバによるキャッシュ管理手順を説明するフローチャートである。
【図8】図2の下位キャッシュサーバにおいて削除されるオブジェクトを図2の上位キャッシュサーバが受理する場合の処理を説明するフローチャートである。
【図9】図2の下位キャッシュサーバにおいて削除されるオブジェクトを図2の上位キャッシュサーバが受理しない場合の処理を説明するフローチャートである。
【符号の説明】
10 クライアント、 12 キャッシュサーバ、 14 サーバ、 20 上位キャッシュサーバ、 22 下位キャッシュサーバ、 30、50 検索部、 32、52 キャッシュバッファ、 34、54 キャッシュエントリ、 55 メトリックス管理用エントリ、 36、56 キャッシュオブジェクト、38、58 キャッシュオブジェクト記憶部、 40、60 キャッシュ管理部、 42、62 キャッシュ移動制御部、 44 メトリックス通知部、 65 メトリックス累積部、 66 評価部。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a cache technology, and more particularly to a cache management method in a network and a cache server that can use the method.
[0002]
[Prior art]
When providing WWW (World Wide Web) services on the Internet, there are limitations on the processing capacity of servers and routers, the bandwidth of communication lines, and the like. Therefore, a proxy cache server is provided on the network, and a client requests an access to a Web object. In general, the processing performance is secured by acting as a proxy and temporarily storing the accessed object. When a client accesses a server and acquires an object, the proxy cache server stores the cache data of the object. When a client makes a request for the same object again from the client, the proxy cache server sends the cache data to the client instead of sending an access request to the server. As a result, the load on the server or the router can be reduced, the network traffic can be reduced, the utilization efficiency of the network resources can be improved, and the response time of the service can be improved.
[0003]
In order to increase the use efficiency of the proxy cache, a large-scale recording device having a sufficient storage capacity for caching objects is required. With the widespread use of broadband networks, the use of large-volume content such as video and music is becoming more and more popular. Therefore, simply installing additional recording devices in the proxy server is not sufficient, and more efficient operation of the proxy cache is required. .
[0004]
The performance of a proxy cache is largely dependent on the cache entry replacement policy. To reserve memory space for caching a new object, the already cached object must be deleted. A replacement policy evaluates the metrics of a cache object in some way to determine which cache object is more efficient to delete. To improve the efficiency of the proxy cache, various replacement policies using metrics such as the last access time, access frequency, and object size have been studied (for example, see Non-Patent Document 1).
[0005]
[Non-patent document 1]
G. FIG. Barish and K.S. Obraczka, "World Wide Web caching: Trends and techniques," IEEE Commun. Mag. , Vol. 38, no. 5, pp. 178-184, May 2000.
[0006]
[Problems to be solved by the invention]
The proposed proxy cache replacement policy operates on a local proxy cache within a single proxy cache server, and the proxy cache server determines that its cache object is no longer useful. At that point, the cache object is immediately deleted from the cache memory. However, the utility value of the cache object should be evaluated in the entire network. To reduce object access time and reduce network traffic, object caches need to be properly distributed over the network, and relying solely on local replacement policies within individual proxy cache servers, Proxy cache performance cannot be fully exploited.
[0007]
The present invention has been made in view of such a situation, and an object of the present invention is to provide a cache management method capable of improving the use efficiency of a cache object and a cache server capable of using the method.
[0008]
[Means for Solving the Problems]
One embodiment of the present invention relates to a cache management method. The method includes, in a hierarchically structured network of cache servers, cumulatively evaluating metrics of objects cached in a plurality of lower-level cache servers in at least one upper-level cache server; When a cache object is deleted in one, it is determined whether the cache object to be deleted is transferred from a lower-level cache server to a higher-level cache server and cached according to the accumulated evaluated metrics. Here, on the network path of the object provided from the server to the client, the client side is set to the lower side and the server side is set to the upper side, and the hierarchical position of the cache server is determined by the relative positional relationship of the cache server on the network path. Can be determined.
[0009]
Only when the lower-level cache server deletes the cache object, the metrics of the cache object may be accumulated in the upper-level cache server. As a result, metrics can be accumulated in the upper-level cache server before the object is deleted in the lower-level cache server. Also, by limiting the accumulation of metrics to caches deleted by lower-level cache servers, it is possible to avoid the accumulation of metrics for a large number of objects cached by lower-level cache servers, and to reduce the traffic between cache servers. Can be minimized. In addition, since metrics are accumulated only at the timing when the cache object is deleted in the cache server in the lower hierarchy, it is possible to prevent the omission of accumulation of metrics and the occurrence of duplicate addition.
[0010]
In the cache server of the higher hierarchy, the cache object may be managed according to a replacement policy based on the metrics evaluated cumulatively. By using the accumulated metrics, it is possible to implement a cache replacement policy in consideration of the access state to the object among a plurality of clients to which the object is provided via the higher-level cache server.
[0011]
Another embodiment of the present invention relates to a cache server. This cache server is a cache server that is relatively lower in the hierarchy in a hierarchically structured cache server network, and includes a cache storage unit that caches and holds an object provided to a client; A cache management unit that manages cache objects in accordance with a replacement policy based on metrics; a metrics notification unit that notifies a cache server in an upper layer only of metrics of cache objects deleted in accordance with the replacement policy; A transfer control unit that, when a transmission request is issued from the cache server, moves the cache object to be deleted to the cache server in the upper hierarchy.
[0012]
Yet another embodiment of the present invention also relates to a cache server. This cache server is a cache server that is relatively higher in a hierarchically configured network of cache servers, and includes a cache storage unit that caches and holds objects provided to clients, and a lower layer. A metrics accumulator that accumulates metrics of cache objects notified from a plurality of cache servers and calculates total metrics for each object; and a cache object held in the cache storage unit according to a replacement policy based on the total metrics. A cache management unit that manages a cache object to be deleted, and when a notification of a cache object to be deleted is received from a lower-level cache server, the cache object to be deleted based on the total metrics. An evaluator for deciding whether to retain the object, and when the evaluator decides to retain the cached object to be deleted, the cached object to be deleted is acquired from a cache server in a lower hierarchy, and A movement control unit for causing the cache management unit to newly manage the object.
[0013]
The metric accumulation unit may receive a notification of the metric of the cache object when the lower-level cache server deletes the cache object according to the replacement policy of the cache server, and accumulate the metric in the total metric.
[0014]
Yet another embodiment of the present invention relates to a computer program. The program includes a step of accumulating metrics of a cache object notified from each of a plurality of lower-level cache servers when a cache object is deleted and calculating a total metric for each object; Receiving the notification of the cache object to be deleted, determining whether or not to retain the cache object to be deleted based on the total metrics. Obtaining the deleted cache object from a cache server; and managing the obtained cache object according to a replacement policy based on the total metrics. Cause the computer to execute.
[0015]
It is to be noted that any combination of the above-described components and any conversion of the expression of the present invention between a method, an apparatus, a server, a system, a computer program, a recording medium, and the like are also effective as aspects of the present invention.
[0016]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 1 is a configuration diagram of an entire network including a cache server according to an embodiment. Clients 10a to 10c (hereinafter, collectively referred to as client 10) are provided via the Internet via Web pages and images provided by servers 14a and 14b (hereinafter, collectively referred to as server 14). Access objects such as audio.
[0017]
The plurality of cache servers 12a to 12e arranged on the Internet have a function as a proxy server for proxying an object access request from the client 10 to the server 14, and relay the object data acquired from the server 14 to the client 10 And caches the object's data temporarily for future use.
[0018]
These cache servers 12a to 12e form a hierarchical structure on a network path from the servers 14a and 14b to the clients 10a to 10c, and cache data of the objects # 1 to # 4 accessed by the clients 10a to 10c. For example, when the client 10a sends an access request for the object # 2 to the server 14a, first, the cache server 12b located closest to the client 10a substitutes for the access request for the object # 2 and ranks higher than the cache server 12b. The object # 2 is requested to a certain cache server 12a. That is, the lower cache server 12b and the upper cache server 12a have a client-server relationship.
[0019]
Further, if there is a cache of the object # 2, the upper cache server 12a returns the cache data to the lower cache server 12b. Otherwise, the upper cache server 12a itself becomes the client 14a as a client. To the object # 2. The upper cache server 12a receives the data of the object # 2 from the server 14a, caches it as the cache object 16a, and returns the data to the lower cache server 12b.
[0020]
The lower cache server 12b receives the data of the object # 2 from the upper cache server 12a, caches the data as the cache object 16b, and returns the data to the client 10a.
[0021]
Thereafter, when another client 10c sends an access request for the same object # 2 to the server 14a, the cache server 12e in the first hierarchy closest to the client 10c substitutes for the access request for the object # 2, and The object # 2 is requested to the cache server 12c in the upper hierarchy. If there is no cache for the object # 2, the cache server 12c in the second hierarchy sends an access request for the object # 2 to the cache server 12a in the next higher hierarchy. Since the third-tier cache server 12a already has the cache object 16a of the object # 2, the data is returned to the second-tier cache server 12c. The second-tier cache server 12c caches the data of the object # 2 as the cache object 16c, and returns the data to the first-tier cache server 12e. The cache server 12e of the first hierarchy caches the received data of the object # 2 as the cache object 16e and returns the data to the client 10c.
[0022]
In this way, the cache object 16e cached in the first-tier cache server 12e is managed according to the cache replacement policy in the cache server 12e, and is replaced and deleted when another object is newly cached. Sometimes. Each of the cache servers 12a to 12e manages a cache object according to a replacement policy based on metrics to be described below.
[0023]
FIG. 2 is a diagram for explaining a method of evaluating cache object metrics by the cache server according to the embodiment. In the example shown in the figure, the object access requests of the clients 10a to 10c to the servers 14a and 14b are represented by the lower cache servers 22a to 22c, respectively, and the lower cache servers 22a to 22c request the object access to the upper cache server 20. Is made. The upper cache server 20 receives and caches the objects from the servers 14a and 14b, operates as a server for the lower cache servers 22a to 22c, and returns the objects to the lower cache servers 22a to 22c. In the figure, the numbers attached to the right shoulders of the caches of the objects # 1 to # 4 indicate the number of local references of the respective cache objects in the cache servers 20, 22a to 22c. 22c manage cache objects in accordance with a replacement policy using the number of times of reference as a metric.
[0024]
Although the two lower cache servers 22a and 22b store the cache objects 18a and 18b of the object # 2, respectively, the number of references to the cache objects 18a and 18b of the object # 2 is four times, and the other cache objects Less than the number of references. However, when viewed from the whole network, the number of references to the cache of the object # 2 is eight in total, which is larger than the number of references to other cache objects.
[0025]
Here, it is assumed that the two lower cache servers 22a and 22b delete the cache objects 18a and 18b with a small number of references, respectively, in order to secure a space for caching a new object. The upper cache server 20 receives the notification of the number of references to the cache objects 18a and 18b of the object # 2 from each of the two lower cache servers 22a and 22b, accumulates the number of references, and the total number of references is eight. Is stored as the total metrics of object # 2.
[0026]
Since the upper cache server 20 manages the cache object 19 of the object # 2 according to the replacement policy based on the total metrics, the cache objects 18a and 18b of the object # 2 are evaluated locally by the lower cache servers 22a and 22b. , The upper level cache server 20 holds the cache object 19 of the object # 2. However, in the upper cache server 20, if there is another object having a large number of references, the cache object 19 of the object # 2 may be deleted soon. In this way, the cache of the object # 2 is gradually deleted from the lower tier to the upper tier cache server, and the cache of the object # 2 is just generated from the upper tier to the lower tier cache server. Contrast with propagation.
[0027]
Similarly, when the cache object 17c of the object # 3 is deleted according to the replacement policy in the lower-level cache server 22c acting on behalf of another client 10c, the reference number of the cache object 17c is six times, and the other client 10a The reference count of the cache object 17a of the object # 3 stored in the lower cache server 22a acting as a proxy is accumulated five times in the upper cache server 20, and it is assumed that the total metric has a reference count of 11 times. It is managed in the server 20.
[0028]
FIG. 3 is a configuration diagram of the lower cache server 22, and FIG. 4 is a configuration diagram of the upper cache server 20. These configurations can be realized in hardware by a CPU, a memory, or other LSI of any computer, and are realized in software by a program having a cache management function loaded in the memory. Here, the functional blocks realized by their cooperation are drawn. Therefore, it is understood by those skilled in the art that these functional blocks can be realized in various forms by hardware only, software only, or a combination thereof.
[0029]
The configuration of the lower cache server 22 will be described with reference to FIG. The lower cache server 22 is provided with a cache buffer 32, and stores entries 34 of objects to be cached (hereinafter, simply referred to as cache entries 34) in a list structure or the like. The cache entry 34 includes a pointer to the cache data 36 of the object (hereinafter, simply referred to as the cache object 36), and the cache object 36 itself is stored in the cache object storage unit 38 which is a large-capacity storage device.
[0030]
FIG. 5 shows the data structure of the cache entry 34. The cache entry 34 includes a URL 70 indicating a storage location of the object in the server 14, a reference count 72 of the cache in the lower cache server 22, a cache last access time 74, a cache access frequency 76, a cache object size 78, And a pointer 80 to the cache object.
[0031]
Referring back to FIG. 3, the search unit 30 searches the list structure of the cache entry 34 of the cache buffer 32 for the object requested by the client 10, and checks whether the object is cached. The URL 70 in FIG. 5 is used as a search key for an object. When a hit occurs in the cache, the search unit 30 retrieves the cache object 36 indicated by the pointer 80 of the hit cache entry 34 from the cache object storage unit 38 and transmits it to the client 10.
[0032]
The cache management unit 40 manages the cache entries 34 stored in the cache buffer 32 in accordance with the replacement policy based on the metrics with reference to the metrics assigned to each cache entry 34 stored in the cache buffer 32. . For example, the reference count 72 in FIG. 5 is used as the metric, and an LFU (Least Frequently Used) scheme for flushing the cache entry 34 with the smallest reference count 72 first is used as the replacement policy.
[0033]
When space for caching a new object is required in the cache object storage unit 38, the cache management unit 40 selects the cache entry 34 having the smallest metric and deletes the cache entry 36 from the cache object storage unit 38. To determine. The cache management unit 40 reads the metrics of the cache object 36 to be deleted from the cache buffer 32 and supplies the metrics to the metrics notification unit 44.
[0034]
The metrics notification unit 44 notifies the higher-level cache server 20 of the metrics of the cache object 36 to be deleted. The cache migration control unit 42 reads the cache object 36 from the cache object storage unit 38 and transfers it to the upper cache server 20 only when receiving a transmission request of the cache object 36 to be deleted from the upper cache server 20.
[0035]
The cache management unit 40 deletes the cache entry 34 of the cache object 36 from the cache buffer 32 in response to the completion of the transfer control of the cache object 36 to be deleted by the cache movement control unit 42, and caches the cache object 36. It is deleted from the object storage unit 38.
[0036]
The configuration of the upper cache server 20 will be described with reference to FIG. The search unit 50, the cache management unit 60, and the cache object storage unit 58 have the same configuration as the search unit 30, the cache management unit 40, and the cache object storage unit 38 of the lower cache server 22 in FIG. There are differences in the entries that are entered.
[0037]
The cache buffer 52 has a metric management entry 55 in addition to the cache entry 54 provided for the cache object 56 in the cache object storage unit 58. The metric management entry 55 is used for cumulative calculation of metrics of objects cached by the lower cache server 22, and the cache object storage unit 58 does not store cache data of the corresponding object. .
[0038]
The cache entry 54 has the same data structure as the cache entry 34 of the lower cache server 22 described with reference to FIG. 5, but the reference count 72 is obtained by cumulatively adding the reference count of the cache object notified from the lower cache server 22. They differ in that they are used as metrics.
[0039]
FIG. 6 shows the data structure of the metrics management entry 55. The metrics management entry 55 stores the URL 82 of the object, the cumulative reference count 84, and the object size 86. When the object specified by the URL 82 of the metric management entry 55 is to be cached also in the upper cache server 20, the metric management entry 55 is replaced with the cache entry 34 described in FIG. Thus, the cache entry 34 is managed in the cache buffer 52 according to the replacement policy.
[0040]
Therefore, the object cached in the lower cache server 22 is managed in the cache buffer 52 of the upper cache server 20 as the cache entry 54, the metric management entry 55, or both. Either not applicable. When managed as the cache entry 54, the cache object 56 is cached in the cache object storage unit 58. However, while managed as the metrics management entry 55, the cache object 56 corresponds to the cache object storage unit 58. No cache data exists.
[0041]
Referring to FIG. 4 again, when the search unit 50 searches for an object requested from the lower-level cache server 22, only the cache entry 54 in the cache buffer 52 is searched. And retrieves the corresponding cache object 56 from the subordinate cache server 22. Further, the cache management unit 60 manages only the cache entry 54 in the cache buffer 52 according to the replacement policy based on the total metrics.
[0042]
When receiving the notification of the metric of the object to be deleted from the lower-level cache server 22, if the object is cached, the metric accumulation unit 65 accumulatively adds the notified metric to the reference count 72 of the cache entry 54. If the object is not cached, the metric notified to the cumulative reference count 84 of the metric management entry 55 is cumulatively added.
[0043]
The evaluation unit 66 receives the notification of the object to be deleted from the lower-level cache server 22, searches the cache entry 54 or the metrics management entry 55 in the cache buffer 52 using the URL of the object as a search key, and Gets the cumulative reference count of. If the object to be deleted exists as the metric management entry 55, since the data of the object is not cached in the upper cache server 20, a new cache entry is created based on the cumulative reference count of the object to be deleted. It is determined whether or not to cache as 54. For example, if the cumulative reference count is larger than the reference count of the other cache entry 54, the object to be deleted is accepted, otherwise, it is not accepted. If there is enough free space in the cache object storage unit 58, the object to be deleted is accepted without evaluating the cumulative reference count.
[0044]
The evaluation unit 66 notifies the cache migration control unit 62 of the determination result. When the cache migration control unit 62 receives the object to be deleted, it sends a transmission request for the object to the lower cache server 22 and the lower cache server 22 Receive object data from.
[0045]
The object data received by the cache movement control unit 62 is stored as a new cache object 56 in the cache object storage unit 58, and the cache management unit 60 replaces the metrics management entry 55 for the cache object 56 with the cache entry 54. In the cache buffer 52 according to the replacement policy.
[0046]
FIGS. 7 to 9 are flowcharts for explaining a cache management procedure performed by the lower cache server 22 and the upper cache server 20 having the above configurations.
[0047]
In FIG. 7, the cache management unit 40 of the lower cache server 22 determines the cache object 36 to be deleted based on the replacement policy (S10). The cache management unit 40 temporarily locks the cache object to be deleted (S12). The metrics notification unit 44 notifies the upper cache server 20 of the URL 70 of the cache entry 34 corresponding to the cache object 36 to be deleted and the reference count 72, which is a local metric (S14). For this notification, an ICP (Internet Cache Protocol) used for communication between the cache servers configured in a hierarchy is used, and the lower-order cache server 22 uses the URL 70 and the reference count 72 in the ICP_MOVE_QUERY message obtained by expanding the standard ICP_QUERY. Is transmitted to the host cache server 20 (S16).
[0048]
Upon receiving the ICP_MOVE_QUERY message, the metrics accumulation unit 65 of the upper cache server 20 searches the cache entry 54 or the metrics management entry 55 in the cache buffer 52 based on the URL 70 included in the ICP_MOVE_QUERY message, and The reference count 72, which is the local metric notified from the lower-level cache server 22, is cumulatively added to the reference count 72 or the cumulative reference count 84 of the metric management entry 55 (S18). If there is no corresponding entry in the cache buffer 52, a new metric management entry 55 is created based on the URL 70 and the reference count 72 notified from the lower cache server 22.
[0049]
When the object to be deleted notified from the lower cache server 22 is not cached, that is, the entry of the object to be deleted is stored in the cache buffer 52 as the metric management entry 55, If there is, based on the accumulated reference count 84 of the metric management entry 55, it is determined whether the object to be deleted is accepted and newly cached (S20). FIG. 8 shows the flow of processing when an object is received (Y in S20), and FIG. 9 shows the flow of processing when an object is not received (N in S20).
[0050]
With reference to FIG. 8, a process in a case where the upper cache server 20 receives the object to be deleted in the lower cache server 22 will be described. The cache migration control unit 62 of the upper cache server 20 requests the lower cache server 22 to transmit the object to be deleted (S22). This transmission request is made by an HTTP (Hypertext Transport Protocol) request using the URL 70 of the object to be deleted notified from the lower cache server 22 (S24). The cache migration control unit 42 of the lower cache server 22 transfers the cache object 36 to be deleted to the upper cache server 20 (S26). This transfer is performed by HTTP reply (S28). The cache management unit 40 of the lower cache server 22 unlocks the cache object 36 to be deleted, deletes the data from the cache object storage unit 38, and deletes the corresponding cache entry 34 from the cache buffer 32 (S34). ).
[0051]
The cache migration control unit 62 of the upper cache server 20 receives the object data transferred by the HTTP reply (S30). The cache migration control unit 62 stores the received data of the object as a new cache object 56 in the cache object storage unit 58, and the cache management unit 60 stores the metrics management entry 55 corresponding to the object in the new cache entry 54. And is managed in the cache buffer 52 (S32).
[0052]
With reference to FIG. 9, a description will be given of a process in a case where the upper cache server 20 does not accept an object to be deleted in the lower cache server 22. The cache migration control unit 62 of the upper cache server 20 transmits an ICP_MOVE_NG message to the lower cache server 22 to notify that the object to be deleted cannot be received (S36). The cache management unit 40 of the lower cache server 22 unlocks the cache object 36 to be deleted, deletes the data from the cache object storage unit 38, and deletes the corresponding cache entry 34 from the cache buffer 32 (S38). ).
[0053]
As described above, according to the embodiment of the present invention, the metric of the cache locally evaluated by the lower-level proxy cache is integrated and reevaluated by the upper-level proxy cache. It is possible to realize a cache replacement policy that takes into account. Thereby, the hit rate of the cache can be increased, and the response time at the time of accessing the object can be improved.
[0054]
Further, according to the embodiment, the cache of objects frequently used by clients in a relatively limited area is provided in a lower-level proxy cache close to the client in the area, and is used from a set of clients in a relatively large area. The cache of the object to be moved can be moved to a higher-level proxy cache, so that the network load can be distributed by appropriately distributing the cache.
[0055]
In addition, even if the lower-level proxy caches belong to different management domains and it is difficult to cooperate between the proxy caches, providing a higher-level proxy cache across the management domains enables the upper-level proxy caches. It will be possible to perform an integrated reevaluation of metrics.
[0056]
The present invention has been described based on the embodiments. These embodiments are exemplifications, and it is understood by those skilled in the art that various modifications can be made to the combination of each component and each processing process, and such modifications are also within the scope of the present invention. By the way. Hereinafter, such a modified example will be described.
[0057]
In the above description, the reference count is used as the metric indicating the utility value of the cache object, and the LFU method is adopted as the replacement policy. However, the present invention can naturally be implemented using metrics other than the reference count. . Further, a replacement policy may be realized by combining other metrics with the number of times of reference. For example, the last access time and access frequency are evaluated as metrics in addition to the number of references, and the cache entry with the longest elapsed time since the last reference is preferentially deleted, or the cache life is considered based on the access frequency. You may do so. Alternatively, it may be determined whether to delete the cache based on the object size. For example, a cache having a large object size takes a long access time, so that it may not be deleted as much as possible, or may be deleted preferentially to save storage space.
[0058]
Also, in the lower cache server, the LRU (Least Recently Used) method using only the last access time as a metric may be adopted as the replacement policy only by counting the number of times of reference. In this case, the lower cache server notifies the upper cache server of the reference count counted for the cache replaced by the LRU method, and the upper cache server manages the cache with a replacement policy based on the accumulated reference count. May be. As described above, the replacement policy may be different between the upper and lower cache servers.
[0059]
In the above description, the configuration and operation are described separately for the upper cache server and the lower cache server. However, if there is a higher cache server with respect to the upper cache server, the higher cache server The server operates as a lower cache server. Therefore, the upper cache server may have the configuration of the lower cache server so that the functions of any cache server can be relatively executed.
[0060]
In a hierarchically configured proxy cache network, a lower cache server generally corresponds to a child proxy cache, and an upper cache server corresponds to a parent proxy cache. However, a child proxy cache belonging to a different parent proxy cache may be set as a lower cache server, and an upper cache server may be provided to control them. As described above, the upper and lower cache servers may be configured without being limited to the parent-child relationship in the proxy cache network.
[0061]
【The invention's effect】
According to the present invention, a cache can be efficiently managed on a network.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of an entire network including a cache server according to an embodiment.
FIG. 2 is a diagram illustrating a method of evaluating cache object metrics by a cache server according to an embodiment.
FIG. 3 is a configuration diagram of a lower cache server of FIG. 2;
FIG. 4 is a configuration diagram of an upper cache server of FIG. 2;
FIG. 5 is an explanatory diagram of a data structure of a cache entry in FIG. 3;
FIG. 6 is an explanatory diagram of a data structure of a metric management entry of FIG. 4;
FIG. 7 is a flowchart illustrating a cache management procedure by the lower cache server and the upper cache server in FIG. 2;
8 is a flowchart illustrating a process when an upper-level cache server in FIG. 2 receives an object to be deleted in the lower-level cache server in FIG. 2;
9 is a flowchart illustrating a process when an object deleted in the lower cache server in FIG. 2 is not accepted by the upper cache server in FIG. 2;
[Explanation of symbols]
10 clients, 12 cache servers, 14 servers, 20 upper cache servers, 22 lower cache servers, 30, 50 search units, 32, 52 cache buffers, 34, 54 cache entries, 55 metrics management entries, 36, 56 cache objects, 38, 58 cache object storage unit, 40, 60 cache management unit, 42, 62 cache movement control unit, 44 metrics notification unit, 65 metrics accumulation unit, 66 evaluation unit.

Claims (8)

階層的に構成されたキャッシュサーバのネットワークにおいて、下位階層の複数のキャッシュサーバにキャッシュされるオブジェクトのメトリックスを上位階層の少なくとも1つのキャッシュサーバにおいて累積評価し、下位階層のキャッシュサーバの1つにおいてキャッシュオブジェクトが削除されるとき、累積評価されたメトリックスに応じて、その削除されるキャッシュオブジェクトを下位階層のキャッシュサーバから上位階層のキャッシュサーバに転送してキャッシュするかどうかを決定することを特徴とするキャッシュ管理方法。In a hierarchically structured network of cache servers, metrics of objects cached in a plurality of lower-level cache servers are cumulatively evaluated in at least one upper-level cache server, and cached in one of the lower-level cache servers. When an object is deleted, it is determined whether the cache object to be deleted is transferred from a lower-level cache server to a higher-level cache server and cached according to the accumulated metrics. Cache management method. 下位階層のキャッシュサーバがキャッシュオブジェクトを削除するときに限り、上位階層のキャッシュサーバにおいてそのキャッシュオブジェクトのメトリックスが累積されることを特徴とする請求項1に記載のキャッシュ管理方法。2. The cache management method according to claim 1, wherein the metrics of the cache object are accumulated in the upper-level cache server only when the lower-level cache server deletes the cache object. 上位階層のキャッシュサーバにおいては、累積評価されたメトリックスにもとづく置換ポリシーにしたがってキャッシュオブジェクトが管理されることを特徴とする請求項1または2に記載のキャッシュ管理方法。3. The cache management method according to claim 1, wherein a cache object is managed in a cache server of a higher hierarchy according to a replacement policy based on the accumulated evaluated metrics. クライアントへ提供されるオブジェクトをキャッシュして保持するキャッシュ記憶部と、
所定のメトリックスにもとづく置換ポリシーにしたがってキャッシュオブジェクトの管理を行うキャッシュ管理部と、
前記置換ポリシーにしたがって削除されるキャッシュオブジェクトのメトリックスに限り、上位階層のキャッシュサーバに通知するメトリックス通知部と、
前記上位階層のキャッシュサーバから送信要求があった場合に、その削除されるキャッシュオブジェクトを前記上位階層のキャッシュサーバに移動させる移動制御部とを含むことを特徴とするキャッシュサーバ。
A cache storage unit that caches and holds an object provided to a client;
A cache management unit that manages cache objects according to a replacement policy based on predetermined metrics,
Only a metric of the cache object deleted according to the replacement policy, a metric notifying unit that notifies a cache server of a higher hierarchy,
A cache control unit that, when a transmission request is issued from the upper-layer cache server, moves a cache object to be deleted to the upper-layer cache server.
クライアントへ提供されるオブジェクトをキャッシュして保持するキャッシュ記憶部と、
下位階層にある複数のキャッシュサーバから通知されるキャッシュオブジェクトのメトリックスを累積してオブジェクト毎にトータルメトリックスを算出するメトリックス累積部と、
前記トータルメトリックスにもとづく置換ポリシーにしたがって前記キャッシュ記憶部に保持されたキャッシュオブジェクトの管理を行うキャッシュ管理部と、
下位階層のキャッシュサーバから削除されるキャッシュオブジェクトの通知を受けた場合に、前記トータルメトリックスにもとづいてその削除されるキャッシュオブジェクトを保持するかどうかを決定する評価部と、
前記評価部がその削除されるキャッシュオブジェクトを保持すると決定した場合、下位階層にあるキャッシュサーバからその削除されるキャッシュオブジェクトを取得して、そのキャッシュオブジェクトを前記キャッシュ管理部に新たに管理させる移動制御部とを含むことを特徴とするキャッシュサーバ。
A cache storage unit that caches and holds an object provided to a client;
A metric accumulating unit that accumulates metrics of cache objects notified from a plurality of cache servers in a lower hierarchy and calculates a total metric for each object;
A cache management unit that manages a cache object held in the cache storage unit according to a replacement policy based on the total metrics;
An evaluator configured to determine whether to retain the deleted cache object based on the total metrics when a notification of the cache object to be deleted is received from the lower-level cache server,
When the evaluator determines that the cache object to be deleted is to be retained, the migration control that obtains the cache object to be deleted from a lower-level cache server and newly manages the cache object by the cache management unit And a cache server.
前記メトリックス累積部は、下位階層のキャッシュサーバがそのキャッシュサーバの置換ポリシーにしたがってキャッシュオブジェクトを削除する際に、そのキャッシュオブジェクトのメトリックスの通知を受け、前記トータルメトリックスに累積することを特徴とする請求項5に記載のキャッシュサーバ。The metric accumulation unit, when a lower-level cache server deletes a cache object in accordance with a replacement policy of the cache server, receives a notification of the metric of the cache object and accumulates the metric in the total metric. Item 6. The cache server according to item 5. 前記メトリックスは、キャッシュオブジェクトの参照回数であることを特徴とする請求項4または5に記載のキャッシュサーバ。The cache server according to claim 4, wherein the metric is a reference count of a cache object. 下位階層にある複数のキャッシュサーバの各々からキャッシュオブジェクトの削除時に通知される当該キャッシュオブジェクトのメトリックスを累積してオブジェクト毎にトータルメトリックスを算出するステップと、
下位階層のキャッシュサーバから削除されるキャッシュオブジェクトの通知を受けて、前記トータルメトリックスにもとづいてその削除されるキャッシュオブジェクトを保持するかどうかを決定するステップと、
その削除されるキャッシュオブジェクトを保持すると決定した場合、下位階層にあるキャッシュサーバからその削除されるキャッシュオブジェクトを取得するステップと、
取得されたキャッシュオブジェクトを前記トータルメトリックスにもとづく置換ポリシーにしたがって管理するステップとをコンピュータに実行させることを特徴とするプログラム。
Calculating a total metric for each object by accumulating metrics of the cache object notified at the time of deleting the cache object from each of the plurality of cache servers in the lower hierarchy;
Receiving a notification of a cache object to be deleted from a lower tier cache server, and determining whether to retain the deleted cache object based on the total metrics;
Obtaining the deleted cache object from a lower-level cache server if it is determined to retain the deleted cache object;
And a step of managing the acquired cache object in accordance with a replacement policy based on the total metrics.
JP2003052579A 2003-02-28 2003-02-28 Method for managing cache, and cache server capable of using this method Pending JP2004264956A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003052579A JP2004264956A (en) 2003-02-28 2003-02-28 Method for managing cache, and cache server capable of using this method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003052579A JP2004264956A (en) 2003-02-28 2003-02-28 Method for managing cache, and cache server capable of using this method

Publications (1)

Publication Number Publication Date
JP2004264956A true JP2004264956A (en) 2004-09-24

Family

ID=33117421

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003052579A Pending JP2004264956A (en) 2003-02-28 2003-02-28 Method for managing cache, and cache server capable of using this method

Country Status (1)

Country Link
JP (1) JP2004264956A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007199920A (en) * 2006-01-25 2007-08-09 Hitachi Ltd Storage device and its control method
JP2013520738A (en) * 2010-02-26 2013-06-06 インターナショナル・ビジネス・マシーンズ・コーポレーション Secure caching method, system, and program for database applications
CN103236989A (en) * 2013-04-25 2013-08-07 青岛海信传媒网络技术有限公司 Cache control method, devices and system in content delivery network
JP2020522078A (en) * 2017-06-02 2020-07-27 華為技術有限公司Huawei Technologies Co.,Ltd. Data access method and device
CN115442317A (en) * 2021-12-17 2022-12-06 北京罗克维尔斯科技有限公司 Message processing method, device, system, equipment and medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007199920A (en) * 2006-01-25 2007-08-09 Hitachi Ltd Storage device and its control method
JP2013520738A (en) * 2010-02-26 2013-06-06 インターナショナル・ビジネス・マシーンズ・コーポレーション Secure caching method, system, and program for database applications
US8886673B2 (en) 2010-02-26 2014-11-11 International Business Machines Corporation Optimizing data cache when applying user-based security
CN103236989A (en) * 2013-04-25 2013-08-07 青岛海信传媒网络技术有限公司 Cache control method, devices and system in content delivery network
JP2020522078A (en) * 2017-06-02 2020-07-27 華為技術有限公司Huawei Technologies Co.,Ltd. Data access method and device
CN115442317A (en) * 2021-12-17 2022-12-06 北京罗克维尔斯科技有限公司 Message processing method, device, system, equipment and medium
CN115442317B (en) * 2021-12-17 2023-10-10 北京罗克维尔斯科技有限公司 Message processing method, device, system, equipment and medium

Similar Documents

Publication Publication Date Title
US10911530B2 (en) Content delivery method, virtual server management method, cloud platform, and system
KR101228230B1 (en) Methods and apparatus for self-organized caching in a content delivery network
US6370620B1 (en) Web object caching and apparatus for performing the same
Dutta et al. Caching scheme for information‐centric networks with balanced content distribution
US20070050491A1 (en) Cache system
US20010034752A1 (en) Method and system for symmetrically distributed adaptive matching of partners of mutual interest in a computer network
KR20140067881A (en) Method for transmitting packet of node and content owner in content centric network
KR20130125844A (en) System and method of utilizing a framework for information routing in large-scale distributed systems using swarm intelligence
JP5998281B2 (en) Method for managing storing a list of N items in a memory cache of C items of a cache system
Mokhtarian et al. Flexible caching algorithms for video content distribution networks
Xu et al. Caching and prefetching for web content distribution
Zhang et al. NCPP-based caching and NUR-based resource allocation for information-centric networking
Lal et al. A popularity based content eviction scheme via betweenness-centrality caching approach for content-centric networking (CCN)
JP2004264956A (en) Method for managing cache, and cache server capable of using this method
Tiwari et al. A novel hybrid approach for web caching
Jeon et al. On-path caching in information-centric networking
JP7174372B2 (en) Data management method, device and program in distributed storage network
Mokhtarian Content management in planet-scale video CDNs
Fang et al. A data-mining-based prefetching approach to caching for network storage systems
Mahmood Dynamic replication of web contents
Karlsson Replica placement and request routing
Dutta et al. Caching Mechanisms for Faster Content Retrieval
KR20030053285A (en) Logic Architecture And Method For Web Cache Alternate
Wong et al. Site-based approach in HTTP proxy design
Sofi et al. A proxy load reduction technique to improve web performance

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041202

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050111

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20050112

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070427

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070508

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070911