Skip to content

perf: runtime lookup and polling optimizations#17

Merged
ibrahimkizilarslan merged 1 commit into
mainfrom
perf/runtime-lookup-optimization
Jun 8, 2026
Merged

perf: runtime lookup and polling optimizations#17
ibrahimkizilarslan merged 1 commit into
mainfrom
perf/runtime-lookup-optimization

Conversation

@ibrahimkizilarslan

Copy link
Copy Markdown
Owner
  1. Docker Container ID Cache & Filters (P1): Added an LRU-style cache with a 30s TTL for container ID lookups. Changed getContainerID to use Docker's filter API instead of listing all containers, preventing O(N) API calls per operation.
  2. Kubernetes Pod Lookup Optimization (P2): Modified findPod to attempt exact name matching (O(1)) and label-based selection (server-side filtering) before falling back to the expensive namespace-wide pod list.
  3. Docker Exec Polling Backoff (P3): Replaced the fixed 100ms polling loop in ExecCommand with an exponential backoff starting at 50ms up to 500ms to reduce Docker daemon load.
  4. Kubernetes Ephemeral Wait Backoff (P4): Introduced exponential backoff for ephemeral container readiness checks, reducing kube-apiserver load.
  5. History Memory Leak Fix (P5): Fixed unbounded array growth in the chaos engine event history by allocating a new slice when trimming, allowing the old array to be GC'd.

1. Docker Container ID Cache & Filters (P1): Added an LRU-style
   cache with a 30s TTL for container ID lookups. Changed
   getContainerID to use Docker's filter API instead of listing
   all containers, preventing O(N) API calls per operation.
2. Kubernetes Pod Lookup Optimization (P2): Modified findPod
   to attempt exact name matching (O(1)) and label-based
   selection (server-side filtering) before falling back to
   the expensive namespace-wide pod list.
3. Docker Exec Polling Backoff (P3): Replaced the fixed 100ms
   polling loop in ExecCommand with an exponential backoff
   starting at 50ms up to 500ms to reduce Docker daemon load.
4. Kubernetes Ephemeral Wait Backoff (P4): Introduced
   exponential backoff for ephemeral container readiness checks,
   reducing kube-apiserver load.
5. History Memory Leak Fix (P5): Fixed unbounded array growth
   in the chaos engine event history by allocating a new slice
   when trimming, allowing the old array to be GC'd.
@ibrahimkizilarslan ibrahimkizilarslan merged commit 9aa18c0 into main Jun 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant