Ask Your Question

Expected behavior of Keystone memcached tokens?

asked 2014-04-21 13:18:06 -0500

conrad gravatar image

My team has a use case for Keystone memcached tokens and I want to confirm what I saw when I was playing with this configuration. I turned on memcached and was able to create and validate tokens. I then queried memcached for the tokens and I saw them. I did not see the tokens in the database. Is this expected behavior?

It was my understanding that memcache is usually used to support improvement of read access so the initial write is to the database, and any reads after the first one is from memcache; hence tokens should appear in both places.

From the code, it looks like the backend only talks to memcache, but I want to make sure that this is the design intent. Thanks in advance.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2014-04-22 01:25:51 -0500

nethawk gravatar image

When you use memcached,the tokens will be saved in memcahced instead of database.And tokens need'nt write to database when using memcached.

edit flag offensive delete link more

answered 2014-04-21 22:11:44 -0500

updated 2014-04-22 01:53:59 -0500

Memcache in services
You want to configure memcache in  the services.  Specifically the authtoken section of your service refers to keystone middleware.  There you want to configure memcache so that keystone middleware makes use of memcache instead of talking to keystone for every request.

Use memcache to cache the token in keystone server
  In keystone.conf there is cache settings.  enable global cache and then enable token cache and then configure the cache backend for dogpile. Dogphile cache backend can be  inmemory , memcache or mongo db.  BTW this is from icehouse release
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-04-21 13:18:06 -0500

Seen: 620 times

Last updated: Apr 22 '14