[openstack-dev] [Keystone][Oslo] Caching tokens in auth token middleware

Vishvananda Ishaya vishvananda at gmail.com
Fri Mar 1 18:18:54 UTC 2013


Hi Everyone,

So I've been doing some profiling of api calls against devstack and I've discovered that a significant portion of time spent is in the auth_token middleware validating the PKI token. There is code to turn on caching of the token if memcache is enabled, but this seems like overkill in most cases. We should be caching the token in memory by default. Fortunately, nova has some nifty code that will use an in-memory cache if memcached isn't available.

I think it is important that we get this code into python-keystoneclient in time for the grizzly release. There are three basic options.

1) Shim the code into the wsgi stack using the configuration options designed for swift:

https://review.openstack.org/23236

This is my least favorite option since changing paste config is a pain for deployers and it doesn't help any of the other projects.

2) Copy the code into keystoneclient:

https://review.openstack.org/23307

3) Move memorycache into oslo and sync it to nova and keystoneclient:

https://review.openstack.org/23306
https://review.openstack.org/23308
https://review.openstack.org/23309

I think 3) is the right long term move, but I'm not sure if this appropriate considering how close we are to the grizzly release, so if we want to do 2) immediately and postpone 3) until H, that is fine with me.

Thoughts?

Vish


More information about the OpenStack-dev mailing list