跳转到内容
#0518
Containers

Capacity planning is a GET

Forty-one containers on the engineering server. The question from the budget meeting: do we need a second box?

GET /api/v1/rentals/{id}/runtime returns live CPU, memory, and disk for the rented machine, served from a short-TTL cache so you can poll it. Memory sits at 61% of 256GB. CPU idles most of the day and peaks at lunch. Disk has terabytes to spare. GET /api/v1/projects/{id}/stats breaks the same picture down per container, so the three that are actually hot have names.

Answer: no. Forty-one is not a capacity number; 61% is. The team keeps cloning environments until that figure moves, because a mostly-idle container costs almost nothing to keep: clones share disk blocks copy-on-write and the kernel caches shared binaries once.

You rent the second box when the first one tells you to.