Skip to content

Archive

Capacity

4 articles
Software Engineering 22 Sep 2026 5 min read

Load Shedding Protects Services When Capacity Runs Out

Load Shedding Protects Services When Capacity Runs Out A service can receive more work than it can complete. The first visible symptom is often not an immediate error but a queue that grows while workers remain fully occupied. Requests spend longer waiting, deadlines expire, clients retry, and the extra retry traffic can deepen the overload. Load shedding places an explicit rejection point before that spiral consumes every available resource. The service admits work that fits its operating capacity and fails excess work quickly enough to preserve useful throughput for requests that can still complete.

Software Engineering 21 Sep 2026 7 min read

Load Shedding Protects Useful Work Under Saturation

Load Shedding Protects Useful Work Under Saturation A service has a finite amount of work it can complete per unit of time. When offered load rises past that capacity, accepting every request does not create more capacity. It creates more waiting, consumes memory and connection slots, extends deadlines, and can leave expensive work running after callers have already given up. Load shedding makes admission explicit. Work that the service cannot process within its operating envelope is rejected early so admitted work retains a realistic chance of completing.

Go 12 Sep 2026 4 min read

Limit Go Slice Capacity with slices.Clip

A Go slice can be short while still carrying much more capacity than its current length. That extra capacity is useful when more elements are expected, but sometimes code should hand off a slice without leaving room for an append to reuse the same tail. slices.Clip gives that intent a direct operation. Clip returns a slice with the same elements and length, but its capacity is reduced to its length.

Go 11 Sep 2026 5 min read

Reserve Go Slice Capacity with slices.Grow

Repeated append calls can force a Go slice to move to a larger backing array when its capacity runs out. If code already knows that several more elements are about to arrive, slices.Grow can reserve enough room before those appends happen. The key detail is that slices.Grow changes capacity when needed, not length. Existing elements stay in place logically, and the returned slice still contains the same number of elements.