Urgent.News

What's breaking now, across thousands of outlets.

Tech

Sizing a session broker: the unit is concurrent sessions, and the bottleneck is not the CPU

Disclosure: the numbers below are from Tessera, which I work on. The reasoning applies to any proxy that sits in a session path. Every vendor page in this category says something like "scales to thousands of users". It is a useless number, because a user who is not connected costs nothing. What costs something is a session that is open right now. So here is the arithmetic instead, with the…

The unit that determines the size of a session broker is concurrent sessions, not the CPU. The planning rule is that a normal working day sees 10-20% of a team connected at once. For a 200-person engineering organization, that translates to 20-40 concurrent sessions, not a size that requires a cluster. A proxied session mainly consists of buffers, with about 320 KB per session.

For 200 concurrent sessions, this amounts to approximately 94 MB of live data. However, this is not what the resident memory will show, as Go does not release memory to the operating system promptly and the collector allows the heap to grow to roughly twice the live set before collecting. Thus, the resident memory settles at about double the initial calculation.

When sizing a Go service, it is crucial to consider the memory usage beyond the arithmetic calculation, as Go does not hand memory back promptly. The Helm chart typically ships with requests of 256Mi and limits of 1Gi, which corresponds to the middle row in the provided table.

The CPU is almost never the limiting factor, as encryption with AES-NI is performed in hardware on modern CPUs. One vCPU can handle 50 concurrent sessions, and four vCPUs can handle 200-plus. The exceptions are sustained file transfer and RDP, which hit different limits first. The actual bottleneck is the link saturation, with interactive only workloads saturating at 100 Mbit/s, and heavy transfers or RDP requiring 1 Gbit/s or even 10 Gbit/s.

Interactive traffic is negligible, with keystrokes and screen output being a few KB/s per session. RDP, however, requires significantly more bandwidth, with one session running 0.5 to 5 Mbit/s, and twenty concurrent RDP sessions demanding 100-200 Mbit/s through the controller. If RDP is a significant part of your usage, size the link for RDP sessions alone, treating everything else as rounding error.

Latency is the number people complain about, but it is often overlooked when sizing a session broker. The double hop adds round-trip time on every keystroke echo, causing users to perceive the tool as "laggy." To mitigate this, put the controller in the same datacenter as the targets. If you have targets in multiple regions, consider using multiple controllers instead of one highly connected controller.

The overhead of the proxy itself is approximately 20%, which is a floor rather than an expectation. For real networks, this overhead adds its own cost, so it is essential to consider this when sizing a session broker. Bulk transfers, such as database dumps, backups, and CI artefacts, should be routed outside the session broker to avoid unnecessary overhead.

Session recordings apply only to terminal sessions, with recordings ranging from 1-5 MB per session-hour. RDP traffic does not generate recordings, as it carries the RDP protocol rather than a terminal stream.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Standing access is the risk that never makes it onto the risk register

Every infrastructure post-mortem contains the same paragraph, and it is never the one anyone expected to write. The initial access was not sophisticated.

  • Standing access often overlooked in risk registers
  • Occurs when authorized credential no longer needed
  • Difficult to track and manage credential usage

Four security decisions that look like nothing and are not

Disclosure: these are decisions from Tessera, which I work on. They are all small enough to copy into your own service, which is why they are worth writing up.

  • Count against real TCP connection address, not X-Forwarded-For header
  • Validate target addresses to prevent Server-Side Request Forgery
  • Store SSH host keys on first use, reject changed keys later

What running your own SSH certificate authority actually costs

Disclosure: I work on Tessera, which is on the buy side of this. I have tried to cost the build side properly, because a comparison where the build option looks stupid is a comparison nobody believes.

  • Initial build takes about a week, including key generation and configuration.
  • Securing CA key adds 2-4 weeks of operational work due to HSM/KMS integration.
  • Ongoing maintenance costs around $15k–$50k annually, totaling $75k–$150k for build and upkeep.

Your access tool is a vendor with a copy of your infrastructure map

Disclosure: I work on Tessera, which is self-hosted. That is the position I am arguing from, and the costs of that position are in the last section.

  • Access tool is a vendor with infrastructure map copy
  • Security questionnaires overlook access-control role
  • Hosted access broker knows infrastructure details

More from Tuesday 1 September →