From 6643f63b3dac1b0316ab5e541d0afa62c7c7f5ee Mon Sep 17 00:00:00 2001 From: Mina Abadir Date: Thu, 27 Aug 2026 13:26:17 -0400 Subject: [PATCH 1/2] introduce soci --- README.md | 6 +++--- compute/ecs_service/rvn-ecs-nlb-definition.yml | 8 +++++--- compute/ecs_service/rvn-ecs-web-definition.yml | 8 +++++--- compute/ecs_service/rvn-ecs-worker-definition.yml | 8 +++++--- .../inputs/ecs-service-builder-ecr-misc-inputs.yml | 11 +++++++++++ 5 files changed, 29 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e85bb661..54718aa6 100644 --- a/README.md +++ b/README.md @@ -69,9 +69,9 @@ sync by `node tools/ravion-modules/dist/src/cli.js readme` (enforced in CI, and | `rvn-cloudfront` | CloudFront CDN | v1.3.0 | `cdn/cloudfront/` | | `rvn-ec2-service` | EC2 Service | v1.4.1 | `compute/ec2_service/` | | `rvn-ecs-cluster` | ECS Cluster | v1.0.1 | `compute/ecs_cluster/` | -| `rvn-ecs-nlb` | ECS Network Service | v1.1.0 | `compute/ecs_service/` | -| `rvn-ecs-web` | ECS Web Service | v1.1.0 | `compute/ecs_service/` | -| `rvn-ecs-worker` | ECS Worker | v1.1.0 | `compute/ecs_service/` | +| `rvn-ecs-nlb` | ECS Network Service | v1.2.0 | `compute/ecs_service/` | +| `rvn-ecs-web` | ECS Web Service | v1.2.0 | `compute/ecs_service/` | +| `rvn-ecs-worker` | ECS Worker | v1.2.0 | `compute/ecs_service/` | | `rvn-efs` | EFS File System | v1.0.1 | `storage/efs/` | | `rvn-elasticache` | ElastiCache | v1.0.1 | `cache/elasticache/` | | `rvn-lambda` | Lambda Function | v1.1.0 | `compute/lambda/` | diff --git a/compute/ecs_service/rvn-ecs-nlb-definition.yml b/compute/ecs_service/rvn-ecs-nlb-definition.yml index 2279351b..17cafeec 100644 --- a/compute/ecs_service/rvn-ecs-nlb-definition.yml +++ b/compute/ecs_service/rvn-ecs-nlb-definition.yml @@ -3,8 +3,8 @@ definition: name: ECS Network Service description: Network Load Balanced ECS service for running TCP, UDP, or TLS workloads behind an ECS cluster Network Load Balancer. release: - version: 1.1.0 - description: Add Builder IAM policies inputs that attach extra IAM managed policies to the EC2 build runner role or replace the step default policies entirely for the duration of each build. + version: 1.2.0 + description: Enable SOCI lazy loading by default so Fargate starts tasks before the full image finishes downloading, cutting startup time for large images. Turn it off for small images or EC2 capacity. module: inputs: - id: section_cluster @@ -333,7 +333,9 @@ module: destroy: pipeline_id: << defaults.destroy_pipeline_id >> build: - $include: ../../partials/build/ecs-service-image-build.yml + $merge: + - ../../partials/build/ecs-service-image-build.yml + soci_enabled: << module.input.soci_enabled >> deploy: $merge: - ../../partials/deploy/ecs-service-deploy-common.yml diff --git a/compute/ecs_service/rvn-ecs-web-definition.yml b/compute/ecs_service/rvn-ecs-web-definition.yml index 8b365237..1e4a3940 100644 --- a/compute/ecs_service/rvn-ecs-web-definition.yml +++ b/compute/ecs_service/rvn-ecs-web-definition.yml @@ -3,8 +3,8 @@ definition: name: ECS Web Service description: Web server ECS service for running an HTTP application behind an ECS cluster load balancer. release: - version: 1.1.0 - description: Add Builder IAM policies inputs that attach extra IAM managed policies to the EC2 build runner role or replace the step default policies entirely for the duration of each build. + version: 1.2.0 + description: Enable SOCI lazy loading by default so Fargate starts tasks before the full image finishes downloading, cutting startup time for large images. Turn it off for small images or EC2 capacity. module: inputs: - id: section_cluster @@ -366,7 +366,9 @@ module: destroy: pipeline_id: << defaults.destroy_pipeline_id >> build: - $include: ../../partials/build/ecs-service-image-build.yml + $merge: + - ../../partials/build/ecs-service-image-build.yml + soci_enabled: << module.input.soci_enabled >> deploy: $merge: - ../../partials/deploy/ecs-service-deploy-common.yml diff --git a/compute/ecs_service/rvn-ecs-worker-definition.yml b/compute/ecs_service/rvn-ecs-worker-definition.yml index dec286b4..816dd366 100644 --- a/compute/ecs_service/rvn-ecs-worker-definition.yml +++ b/compute/ecs_service/rvn-ecs-worker-definition.yml @@ -3,8 +3,8 @@ definition: name: ECS Worker description: Background worker ECS service for running private container workloads without exposed ports. release: - version: 1.1.0 - description: Add Builder IAM policies inputs that attach extra IAM managed policies to the EC2 build runner role or replace the step default policies entirely for the duration of each build. + version: 1.2.0 + description: Enable SOCI lazy loading by default so Fargate starts tasks before the full image finishes downloading, cutting startup time for large images. Turn it off for small images or EC2 capacity. module: inputs: - id: section_cluster @@ -74,7 +74,9 @@ module: destroy: pipeline_id: << defaults.destroy_pipeline_id >> build: - $include: ../../partials/build/ecs-service-image-build.yml + $merge: + - ../../partials/build/ecs-service-image-build.yml + soci_enabled: << module.input.soci_enabled >> deploy: $merge: - ../../partials/deploy/ecs-service-deploy-common.yml diff --git a/partials/inputs/ecs-service-builder-ecr-misc-inputs.yml b/partials/inputs/ecs-service-builder-ecr-misc-inputs.yml index d083927a..1a930ba8 100644 --- a/partials/inputs/ecs-service-builder-ecr-misc-inputs.yml +++ b/partials/inputs/ecs-service-builder-ecr-misc-inputs.yml @@ -6,6 +6,17 @@ - dockerfile - railpack - nixpacks +- id: soci_enabled + label: SOCI lazy loading + type: boolean + description: Build a SOCI-enabled image so Fargate can lazily load it, starting tasks before the full image is downloaded. On by default, and worth the most on images larger than 250 MiB. Turn it off for small images or EC2 capacity, where the gzip layer compression SOCI requires makes builds slower without speeding up task startup. Lazy loading also changes how long tasks take to report healthy, so services behind a load balancer may need a longer health check grace period. + collapsible: true + show_when: + build_source: + - dockerfile + - railpack + - nixpacks + default: true - id: section_ecr label: Image registry lifecycle type: section From 7fe348418c12059794b5677f9440d6ea217c9c62 Mon Sep 17 00:00:00 2001 From: Mina Abadir Date: Thu, 27 Aug 2026 18:04:14 -0400 Subject: [PATCH 2/2] Drop the small-image caveat from soci_enabled guidance Measured on a 168 MiB service, well under the 250 MiB figure AWS suggests as a rule of thumb: image pull dropped 9.42s to 2.21s and task start 46.97s to 24.48s. Small images benefit too, so telling users to turn SOCI off for them was wrong. EC2 capacity remains the real reason to disable it, since those instances have no soci-snapshotter to lazily load with. --- compute/ecs_service/rvn-ecs-nlb-definition.yml | 2 +- compute/ecs_service/rvn-ecs-web-definition.yml | 2 +- compute/ecs_service/rvn-ecs-worker-definition.yml | 2 +- partials/inputs/ecs-service-builder-ecr-misc-inputs.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compute/ecs_service/rvn-ecs-nlb-definition.yml b/compute/ecs_service/rvn-ecs-nlb-definition.yml index 17cafeec..4fd9d632 100644 --- a/compute/ecs_service/rvn-ecs-nlb-definition.yml +++ b/compute/ecs_service/rvn-ecs-nlb-definition.yml @@ -4,7 +4,7 @@ definition: description: Network Load Balanced ECS service for running TCP, UDP, or TLS workloads behind an ECS cluster Network Load Balancer. release: version: 1.2.0 - description: Enable SOCI lazy loading by default so Fargate starts tasks before the full image finishes downloading, cutting startup time for large images. Turn it off for small images or EC2 capacity. + description: Enable SOCI lazy loading by default so Fargate starts tasks before the full image finishes downloading, cutting task startup time. The larger the image the more it saves. Turn it off for EC2 capacity. module: inputs: - id: section_cluster diff --git a/compute/ecs_service/rvn-ecs-web-definition.yml b/compute/ecs_service/rvn-ecs-web-definition.yml index 1e4a3940..188a0b73 100644 --- a/compute/ecs_service/rvn-ecs-web-definition.yml +++ b/compute/ecs_service/rvn-ecs-web-definition.yml @@ -4,7 +4,7 @@ definition: description: Web server ECS service for running an HTTP application behind an ECS cluster load balancer. release: version: 1.2.0 - description: Enable SOCI lazy loading by default so Fargate starts tasks before the full image finishes downloading, cutting startup time for large images. Turn it off for small images or EC2 capacity. + description: Enable SOCI lazy loading by default so Fargate starts tasks before the full image finishes downloading, cutting task startup time. The larger the image the more it saves. Turn it off for EC2 capacity. module: inputs: - id: section_cluster diff --git a/compute/ecs_service/rvn-ecs-worker-definition.yml b/compute/ecs_service/rvn-ecs-worker-definition.yml index 816dd366..f25ced46 100644 --- a/compute/ecs_service/rvn-ecs-worker-definition.yml +++ b/compute/ecs_service/rvn-ecs-worker-definition.yml @@ -4,7 +4,7 @@ definition: description: Background worker ECS service for running private container workloads without exposed ports. release: version: 1.2.0 - description: Enable SOCI lazy loading by default so Fargate starts tasks before the full image finishes downloading, cutting startup time for large images. Turn it off for small images or EC2 capacity. + description: Enable SOCI lazy loading by default so Fargate starts tasks before the full image finishes downloading, cutting task startup time. The larger the image the more it saves. Turn it off for EC2 capacity. module: inputs: - id: section_cluster diff --git a/partials/inputs/ecs-service-builder-ecr-misc-inputs.yml b/partials/inputs/ecs-service-builder-ecr-misc-inputs.yml index 1a930ba8..9ba458de 100644 --- a/partials/inputs/ecs-service-builder-ecr-misc-inputs.yml +++ b/partials/inputs/ecs-service-builder-ecr-misc-inputs.yml @@ -9,7 +9,7 @@ - id: soci_enabled label: SOCI lazy loading type: boolean - description: Build a SOCI-enabled image so Fargate can lazily load it, starting tasks before the full image is downloaded. On by default, and worth the most on images larger than 250 MiB. Turn it off for small images or EC2 capacity, where the gzip layer compression SOCI requires makes builds slower without speeding up task startup. Lazy loading also changes how long tasks take to report healthy, so services behind a load balancer may need a longer health check grace period. + description: Build a SOCI-enabled image so Fargate can lazily load it, starting tasks before the full image is downloaded. On by default, and the larger the image the more it saves. Turn it off for EC2 capacity, where the gzip layer compression SOCI requires makes builds slower without speeding up task startup. Lazy loading also changes how long tasks take to report healthy, so services behind a load balancer may need a longer health check grace period. collapsible: true show_when: build_source: