[openstack-dev] [Nova] bp proposal: discovery of peer instances through metadata service
Justin Santa Barbara
justin at fathomdb.com
Fri Jan 24 18:09:43 UTC 2014
On Fri, Jan 24, 2014 at 12:55 PM, Day, Phil <philip.day at hp.com> wrote:
> > I haven't actually found where metadata caching is implemented,
> although the constructor of InstanceMetadata documents restrictions that
> really only make sense if it is. Anyone know where it is cached?
> Here’s the code that does the caching:
> Data is only cached for 15 seconds by default – the main reason for
> caching is that cloud-init makes a sequence of calls to get various items
> of metadata, and it saves a lot of DB access if we don’t have to go back
> for them multiple times.
> If your using the Openstack metadata calls instead then the caching
> doesn’t buy much as it returns a single json blob with all the values.
Thanks (not quite sure how I missed that, but I did!) 15 second
'micro-caching' is probably great for peer discovery. Short enough that
we'll find any peer basically as soon as it boots if we're polling (e.g. we
haven't yet connected to a peer), long enough to prevent denial-of-service.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev