Launching Seekable OCI for Container images with Lazy Loading
AWS Newest Addition
What is OCI (Open Container Initiative)

What is the lazy loader?
Lazy loading (also known as asynchronous loading) is a design pattern commonly used in computer programming and mostly in web design and development to defer the initialization of an object until the point at which it is needed. It can contribute to efficiency in the program's operation if properly and appropriately used. This makes it ideal in use cases where network content is accessed and initialization times are to be kept at a minimum, such as in the case of web pages. For example, deferring the loading of images on a web page until they are needed can make the initial display of the web page faster. The opposite of lazy loading is eager loading.
Seekable OCI (SOCI) is a technology open-sourced by AWS that enables containers to launch faster by lazily loading the container image. SOCI works by creating an index (SOCI Index) of the files within an existing container image. This index is a key enabler to launching containers faster, providing the capability to extract an individual file from a container image before downloading the entire archive.
Most methods for launching containers download the entire container image from a remote container registry before starting the container. Waiting for all of the data is wasteful in cases when only a small amount of data is needed for startup. The container image downloads account for 76% of container startup time, but on average only 6.4% of the data is needed for the container to start doing useful work.
There are various solutions to this problem, including reducing the size of a container image and pre-fetching container images to local storage. Lazy loading is an approach wher e data is downloaded from the registry in parallel with the application startup. Container images are stored as an ordered list of layers, and layers are most often stored as gzipped tar files. It's usually not possible to fetch individual files from gzipped tar files. Some projects enable lazy loading through format conversion. One such project is stargz-snapshotter, which takes an existing OCI image and builds a new OCI image with an embedded table of contents. With SOCI, we borrowed some of the design principles from stargz-snapshotter, but took a different approach. A SOCI index is generated separately from the container image, and is stored in the registry as an OCI Artifact and linked back to the container image by OCI Reference Types. This means that the containe r images do not need to be converted, image digests do not change, and image signatures remain valid.

An open-source build tool is used to create SOCI indices for existing OCI container images and a remote snapshotter, called soci-snapshotter, provides the container the ability to lazy load images that have been indexed by SOCI. SOCI and the soci-snapshotter are open-sourced under Apache 2.0, and you can learn more about the project on GitHub. We look forward to working and engaging with the community on improving SOCI and making container launches faster.
Reference — https://aws.amazon.com/about-aws/whats-new/2022/09/introducing-seekable-oci-lazy-loading-container-images/
If you liked this article, please show your appreciation by clapping 👏 below!
Follow me on -
Ruchi A — Medium
Read more from my space:
Data Catalogue
What is data Cataloguing !
AWS Glue Initial Steps
A serverless data integration service that m akes it easy to discover, prepare, and combine data for analytics, machine…
Basics of AWS Cloud WAN
Introduction
Amazon Redshift
Got lots of data? Petabytes of data? Looking for a warehouse that is efficient and affordable to analyze it all? Well…
How To Save Money With Aws Redshift Serverless
With Amazon Redshift serverless all the users — including Data analysts, data scientists, and developers- can now use…
Launching Seekable OCI for Container images with Lazy Loading was originally published in Towards AWS on Medium, where people are continuing the conversation by highlighting and responding to this story.
Comments
Post a Comment