Reduce the number of token checks made during networking calls

Registered by Stanislaw Pitucha on 2013-02-28

Due to the current implementation of get_client() for quantum calls, not only does each quantum connection require a new token check, but also quantum clients are created every time, even if they use the same credentials and checks the credentials separately on each call.

Caching the client would allow making fewer token checks and reduce the access time in general.

For example, currently each request for instance metadata will result in 4 token checks in a row. Another request needs anoter 4, etc.

This could be reduced to only 1 request per lifetime of a token, so subsequent requests become keystone-free.

One new issue of this scheme would be that changing endpoints may result in failed requests until the token is invalidated. On the other hand, this is not a problem specific to this scenario, as the endpoint may change between the get_token call and another request - {quantum,glance,keystone}client should handle that situation internally anyway.

Blueprint information

Status:
Complete
Approver:
Matt Riedemann
Priority:
Medium
Drafter:
None
Direction:
Approved
Assignee:
None
Definition:
Approved
Series goal:
Accepted for kilo
Implementation:
Implemented
Milestone target:
None
Started by
Matt Riedemann on 2015-11-24
Completed by
Matt Riedemann on 2015-11-24

Whiteboard

Doesn't patch https://review.openstack.org/56075 resolve this now, at least in part? --mriedem

Gerrit topic: https://review.openstack.org/#q,topic:bp/fewer-networking-token-checks,n,z

Addressed by: https://review.openstack.org/23198
    Delegate authentication to quantumclient

Gerrit topic: https://review.openstack.org/#q,topic:bug/1177579,n,zDoesn't patch https://review.openstack.org/56075 resolve this now, at least in part? --mriedem

Gerrit topic: https://review.openstack.org/#q,topic:bp/fewer-networking-token-checks,n,z

Addressed by: https://review.openstack.org/23198
    Delegate authentication to quantumclient

Gerrit topic: https://review.openstack.org/#q,topic:bug/1177579,n,z

Marking this blueprint as definition: Drafting. If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)

I'm going to mark this as complete, there were several changes over time to add caching support to the neutron module in nova. Also, the keystone v3 session code was added in kilo with https://review.openstack.org/#/c/136931/ so I think we're good here now. -- mriedem 20151124

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.