Calculate the memory request for a pod that reflects real working-set usage.
Many network-facing services (proxies, API gateways, connection-pooling databases) have memory usage that scales with concurrency rather than staying flat. Modeling the request as a fixed baseline plus a per-connection cost captures that relationship far better than a single flat number, and makes it obvious how much headroom you need as traffic grows.
memoryRequest = baseline + (perConnectionMemory × avgConnections)
Load-test the service at two different concurrency levels, record total memory usage at each, and divide the difference in memory by the difference in connection count to isolate the marginal per-connection cost.
Use average for the request (since it drives scheduling and bin-packing) and use peak connections when sizing the corresponding memory limit, to avoid OOMKills during connection spikes.
If memory grows faster than linearly (e.g. due to buffering or backpressure), model a higher effective per-connection value based on your peak-concurrency measurements rather than a light-load average.