soci-snapshotter
cloudsql-proxy
soci-snapshotter | cloudsql-proxy | |
---|---|---|
6 | 1 | |
470 | 1,115 | |
4.0% | - | |
9.2 | 10.0 | |
1 day ago | 10 months ago | |
Go | Go | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
soci-snapshotter
- Seekable OCI - Lazy Loading Container Images on ECS and Fargate
-
Kubernetes SidecarContainers feature is merged
So I can give some behind the scenes insight on that. I don't think image caching will be a thing in the way people are explicitly asking, but we are exploring some alternative approaches to speeding up container launch that we think will actually be even more effective than what people are asking for.
First of all we want to leverage some of the learnings from AWS Lambda, in specific some of the research we've done that shows that about 75% of container images only contain 5% unique bytes (https://brooker.co.za/blog/2023/05/23/snapshot-loading.html). This makes deduplication incredibly effective, and allows the deployment of a smart cache that holds the 95% of popular recurring files and file chunks from container images, while letting the unique 5% be loaded over the network. There will be outliers of course, but if you base your image off a well used base image then it will already be in the cache. This is partially implemented. You will notice that if you use certain base images your Fargate container seems to start a bit faster. (Unfortunately we do not really publish this list or commit to what base images are in the cache at this time).
In another step along this path we are working on SOCI Snapshotter (https://github.com/awslabs/soci-snapshotter) forked off of Stargz Snapshotter. This allows a container image to have an attached index file that actually allows it to start up before all the contents are downloaded, and lazy load in remaining chunks of the image as needed. This takes advantage of another aspect of container images which is that many of them don't actually use all of the bytes in the image anyway.
Over time we want to make these two pieces (deduplication and lazy loading) completely behind the scenes so you just upload your image to Elastic Container Registry and AWS Fargate seems to magically start your image dramatically faster than you could locally if downloading the image from scratch.
-
What is a containerd snapshotter?
This behavior allows us to set up snapshots out of band, that is outside the "normal" workflow. One such example is the soci snapshotter which allows image lazy loading. The snapshotter ships with a "rpull" command which performs this out of band prep. During rpull, the command calls the soci snapshotter which creates fuse mounts for each layer that has an index (remote snapshot). For layers that do not have an index, it downloads them as usual (local snapshot). The local snapshot is created with overlay mount. Anyway, this is just a detail, the important bit is that folders created for a local snapshot only contain that layer, which is exactly what overlay does. For example, after rpull we'll see something like the following:
-
A Hidden Gem: Two Ways to Improve AWS Fargate Container Launch Times
Seekable OCI (SOCI) is a technology open-sourced by AWS that enables containers to launch faster by lazily loading the container image. It’s usually not possible to fetch individual files from gzipped tar files. With SOCI, AWS 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 container images do not need to be converted, image digests do not change, and image signatures remain valid.
- GitHub - awslabs/soci-snapshotter
- awslabs/soci-snapshotter
cloudsql-proxy
-
Kubernetes SidecarContainers feature is merged
That is very annoying. I remember having spent some time with this same issue in Google App Engine as well, which also runs Cloud SQL Proxy as a sidecar container.
https://github.com/GoogleCloudPlatform/cloudsql-proxy/issues...
What are some alternatives?
stargz-snapshotter - Fast container image distribution plugin with lazy pulling
firestruct - Firestruct flattens and unmarshals protojson encoded Firestore documents (as found in Google Cloud Events triggering a cloud function), outputting a Go struct or map[string]interface{} without any extraneous Firestore metadata.
zstd - Zstandard - Fast real-time compression algorithm
cloud-sql-proxy - A utility for connecting securely to your Cloud SQL instances
enhancements - Enhancements tracking repo for Kubernetes
containers-roadmap - This is the public roadmap for AWS container services (ECS, ECR, Fargate, and EKS).
kubernetes - Production-Grade Container Scheduling and Management