Cache Swift Heads

Registered by Chmouel Boudjnah

John was pointing on IRC that the headers on a account HEAD are not served from the cache while we can do some clever things there.

Although stored in the cache :

http://git.io/cakjlg

we are not using it.

The conditions are :

As long it is a simple HEAD without a query string and there's info about it in the memcache just return that.

If it has a X-Newest headers it has to go to the storage nodes and not served by the cache (i.e: see code from here http://git.io/a98tuQ)

Blueprint information

Status:
Started
Approver:
Chmouel Boudjnah
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
Fabien Boucher
Definition:
Drafting
Series goal:
None
Implementation:
Blocked
Milestone target:
None
Started by
Fabien Boucher

Related branches

Sprints

Whiteboard

This is a report for the difficulties I encountered when trying to implement this blueprint.

I've tried to implement something to be able to build a response from the proxy cache account entry to a HEAD request but I was faced to a problem due to Container-count and Bytes-used meta. Those meta are updates by container server by performing a direct PUT on the account server. There is no easy way to invalidate the proxy memcache entry for the related account.

Furthermore how to handle the X-newest header if we use the cached meta to build a response as
we would have three layers (cached, one replica, all replica) to grab the data.

Gerrit topic: https://review.openstack.org/#q,topic:bp/swift-account-head-caching,n,z

This patchset is not complete, I've haven't publish my latest code:
Addressed by: https://review.openstack.org/59784
    AccountController now uses cache for HEAD requests (WIP)

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.