Jump to: navigation, search

Difference between revisions of "ImagePrecacher"

(Created page with "= Goal = Introduce a new, optional nova service to cache high priority images on compute hosts prior to the image being requested during the usual instance creation process....")
(No difference)

Revision as of 20:50, 12 March 2014

Goal

Introduce a new, optional nova service to cache high priority images on compute hosts prior to the image being requested during the usual instance creation process.

Current Caching Strategy

In the current icehouse release of Nova, images are cached on demand. As instances are created, compute hosts need to retrieve the requested image in order to build each instance. The host may then cache that image for some period of time locally. This solution speeds up subsequent requests to build an instance from the same image, on the same host.

Limitations

However, there are some limitations with the current approach:

  • Inconsistent build times - the first build on a host for each image is slower than subsequent ones
  • Network throttling - If creation of a large number of instances is requested, many simultaneous transfers of images to hosts will be initiated. This may have a crippling effect on network performance.

Proposed Caching Service

To rectify the current limitations, we can add a simple nova service to aid in efficient distribution of high priority images to compute hosts out of the control path of the instance creation process. The service would consist of a periodic task performing the following tasks:

  1. List - Obtain a list of images to pre-cache.
  2. Fetch - Obtain a copy of each image's data.
  3. Serve - Setup each image's data for distribution to hosts.
  4. Distribute - Trigger downloads of each image by the hosts.

List

Use a pluggable strategy for obtaining a list of images to pre-cache.

class Lister(