aws / aws/containers-roadmap

[Feature Request] ECS_IMAGE_FREE_SPACE_THRESHOLD

Open
#831 0 comments 0 reactions 0 assignees View on GitHub
ECS
Dominant language
Shell
Stars
5.4k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

### Summary

Be able to specify to ECS the minimum available disk space for docker images that must be available at all times.

### Description

- Add a new image cleanup parameter such as ECS_IMAGE_FREE_SPACE_THRESHOLD, which takes a value in Mb.
- If the threshold is crossed when pulling a new container, the ECS agent automatically prunes images, based on least recently used, until the threshold is reached.

This would essentially incorporate the functionality provided by docuum: https://github.com/stepchowfun/docuum

Currently ECS agent has a time-based parameter for specifying cleanup, which we use. But we've found that to be insufficient in cases where we want to ensure that the disk doesn't run out of space while also keeping as many images available in order of most to least recently used (to minimize the number of new pulls, which can greatly slow down new instances spinning up). Having a disk space based threshold would allow dynamic clean-up times rather than a fixed clean-up age period which may not be optimal.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing ECS image cleanup behavior and its time-based parameter, then compare the proposed approach with docuum. Done means ECS accepts an ECS_IMAGE_FREE_SPACE_THRESHOLD value in MB and prunes least-recently-used images during pulls until the minimum free space is restored.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, docker
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.