Networks, Hardware and Trading Infrastructure · Technology
18Private Connectivity to Crypto Venues
A venue that runs in a public cloud can offer its market makers a private endpoint inside the provider’s network: their orders never touch the public internet, and, if the endpoint has an interface in the same zone as their machines, they never cross a zone boundary either. The zone identifiers of chapter 16 let a firm check which is the case. The difference is not small: in this chapter’s model, the same private endpoint served from another zone adds about to every median round trip, and costs less than a cent more per million messages. Private connectivity is cheap; getting it in the wrong place is expensive only in time.
Chapter 17 found the venue’s region and zone; this chapter connects to it. Virtual networks and the two ways of joining them, peering and private endpoints; what the venues offer (from shared cluster placement to colocation cross-connects for the few that run in data centres); and the tiers of access that unlock the faster paths. The venues’ documentation and the provider’s are cited and dated; the latencies are a labelled simulation built on chapter 16’s published measurement.
18.1 Virtual networks, peering and private endpoints
Definition 18.1 (Virtual private cloud, virtual-network peering)
A virtual private cloud (VPC) is a customer’s private network inside a public cloud: its own address space, subnets in chosen zones, routing and access rules. Virtual-network peering joins two such networks, of the same or different customers, so that their machines exchange traffic over private addresses as if they were one network.
Definition 18.2 (Private endpoint, network load balancer)
A private endpoint is a network interface that a provider places in a customer’s virtual network, in chosen zones, through which the customer reaches another party’s service privately, without routing between the two networks. A network load balancer is the provider’s service that receives connections on one address and spreads them over target machines, at the level of TCP or UDP; a private-endpoint service is typically exposed through one.
Peering and endpoints solve different problems. Peering joins two networks and lets them route to each other: fast, simple, but both sides must agree on addresses and trust each other’s routes. An endpoint publishes one service to many customers without joining their networks: each customer gets an interface in its own network, and the provider carries its packets through a load balancer to the service. AWS documents both: peering makes instances “communicate with each other as if they are within the same network”; PrivateLink connects a network to a service “as if they were in your VPC”.
The endpoint’s zone is the catch. An endpoint has interfaces in the zones where it is created; the load balancer behind it sends each connection to targets in its zone unless cross-zone balancing is enabled, which AWS documents as off by default for network load balancers. If the venue’s gateways are in one physical zone and the firm’s instance in another, every packet crosses the boundary somewhere; the only question is where. Chapter 16’s identifiers let the firm compare its instance’s zone with the endpoint’s interfaces before it sends a single order.
Proposition 18.3 (Where the zone boundary lies)
If the firm’s instance and the venue’s gateways are in different physical zones, every path between them crosses a zone boundary, whatever the endpoint’s placement; if they are in the same zone, a path crosses one only if the endpoint or the load balancer routes the traffic through another zone. The firm therefore needs both identifiers (its instance’s and the venue’s gateways’) to know whether a same-zone path exists.
Proof. A path joins two points; if they lie in different zones some link of the path joins the zones. If they lie in one zone, only a hop placed in another zone (an endpoint interface or a load-balancer node) takes the path out of it and back. ∎
def rtt_percentiles(path, qs=(50, 99), n=200_000, seed=0):
x = cp.sample_rtt(BODIES[path.rtt_body], n, seed) + path.extra_hop_us + 1000.0 * path.edge_ms
return {q: float(np.percentile(x, q)) for q in qs}
def aligned(instance_zone_id, endpoint_zone_ids):
"""True when the endpoint has a network interface in the instance's physical zone."""
return instance_zone_id in set(endpoint_zone_ids)
def cost_per_million(path, bytes_per_message=400):
"""Data processed by the endpoint plus cross-zone transfer (out of one zone, into the other), per million
messages of `bytes_per_message` (request and response together)."""
gb = 1e6 * bytes_per_message / 1e9
return gb * path.usd_per_gb + gb * 2 * path.cross_zone_gb_each_way
def monthly_fixed(path, zones=1, hours=730.0):
return path.usd_hour * zones * hours
As of September 2026 — Private-endpoint prices
AWS’s price list of 17 September 2026 charges 0.014 USD an hour for each interface endpoint in each zone in Asia Pacific (Tokyo), 0.01 in US East (N. Virginia), and 0.01 USD per gigabyte of data processed for the first petabyte a month in a region (0.006 for the next four, 0.004 beyond); data crossing zones is charged 0.01 USD per gigabyte in each direction (chapter 16).
18.2 Venue colocation offers
As of September 2026 — What venues offer, from their documentation
- Coinbase Derivatives: production in Equinix CH4 (350 E Cermak, Chicago), disaster recovery and integration in Equinix NY5 (Secaucus); access by colocation cross-connect (recommended for the lowest and most stable latency), by AWS PrivateLink (“some of the benefits of private connectivity without having to cross connect”), or over the internet with TLS.
- One Trading, with AWS (December 2023): four access tiers tested for market makers, from VPC peering inside a cluster placement group shared between the exchange’s and the market maker’s accounts (lowest latency), through plain peering and PrivateLink behind a network load balancer (medium, with extra hops), to the internet through an edge network; the exchange’s stated goal, round trips under .
A shared cluster placement group is the cloud’s version of colocation: the venue creates the group in its account and shares it, so that the market maker’s instances land in the same high-bisection segment of the network as the venue’s gateways and matching engine. It is the only offer on the list that brings the customer’s machine physically closer; the others choose a route to wherever the machine happens to be.
18.3 Cross-connects at data-centre-hosted venues
Some crypto venues do not run in a cloud at all. Coinbase’s derivatives exchange runs in a Chicago data centre with its disaster recovery in New Jersey, the same buildings as chapter 10’s venues, and sells the connections of chapter 9: cross-connects to the exchange’s network in the building. Its documentation is explicit about the hierarchy: cross-connects for the lowest latency, PrivateLink for private connectivity without a cross-connect, the internet for the rest. For such a venue the cloud is an access network, not the venue’s home, and the firm’s choice is chapter 9’s.
18.4 Dedicated and market-maker gateways, and the tiers that unlock them
The faster paths are not open to everyone. Venues reserve shared placement groups, private endpoints and dedicated gateways for customers above a volume or a fee, as One Quant Book 3’s dated box on dedicated endpoints and tier matching describes, and may apply separate rate limits to them. For the firm that qualifies, the question is the one of this chapter: which path, from which zone. For the one that does not, it is chapter 17’s: the best instance it can find on the public path.
| Path | p50 | p99 | Cost per million | Fixed per zone |
| () | () | messages (USD) | (USD a month) | |
| Peering, shared cluster placement | 150 | 220 | 0 | 0 |
| Peering, same zone | 270 | 396 | 0 | 0 |
| Private endpoint, same zone | 310 | 436 | 0.004 | 10.22 |
| Private endpoint, other zone | 595 | 797 | 0.012 | 10.22 |
| Public endpoint via an edge | 2 270 | 2 396 | 0 | 0 |
nw_private.path_rows().fig_private.py.fig_private.py.def wrong_zone():
s, o = PATHS["endpoint_same"], PATHS["endpoint_other"]
qs, qo = pl.rtt_percentiles(s), pl.rtt_percentiles(o)
cost = pl.cost_per_million(o, BYTES) - pl.cost_per_million(s, BYTES)
return {"p50_added": qo[50] - qs[50], "p99_added": qo[99] - qs[99], "cost_added_per_million": cost}
The costs are an afterthought: one endpoint in one zone for a month is 10.22 USD of endpoint-hours, and even ten billion messages add 40 USD of data processing, 120 across zones. What matters is the zone. The endpoint in the wrong zone adds to the median round trip and to the 99th percentile, more than the whole difference between peering and a same-zone endpoint.
Method 18.4 (Connecting privately to a cloud-hosted venue)
- Read the venue’s connectivity documentation: which paths it offers (shared placement, peering, endpoints, cross-connects), to whom, in which zones, at what rate limits; record each with its date.
- Resolve the zone identifiers of your instances and of the venue’s endpoint interfaces; place instances in the zone of the venue’s gateways.
- Prefer the path with the fewest hops the venue allows; check that the endpoint has an interface in your zone and that its load balancer keeps traffic in the zone.
- Measure each path’s round trip with hardware timestamps; keep the public path as a fallback, and know its latency.
- Price the endpoint-hours and data processing, and check them against the latency; they will be small.
18.5 Tutorial: which path, which zone
Goal. Compare the documented paths to a cloud-hosted venue by round trip and cost, and check zone alignment. End state: Figures 18.3 and 18.4 and Table 18.1.
- Paths.
firm_privlink.load_pathsreadsdata/paths.csv: each documented path with its extra hops, its prices and its sources. - Round trips.
rtt_percentiles(Listing 18.1) adds the hops to chapter 16’s body models. - Alignment.
alignedcompares the instance’s zone identifier with the endpoint’s;nw_private.ALIGNis a failing example. - Costs.
cost_per_millionandmonthly_fixed;monthly_curvedraws the cost against volume.
What to change next. Replace the assumed of endpoint hops with a measurement; enable cross-zone load balancing in the model and route a fraction of connections to the other zone.
18.6 Build: the private-path planner
Purpose. The paths from the firm’s cloud machines to each venue, their round trips and costs, and whether they stay in one zone: the input of the cloud rows of chapter 29’s plan.
Interface. firm_privlink: Path, load_paths, BODIES, rtt_percentiles, aligned, cost_per_million, monthly_fixed; on firm.cloudplan.
Rules. A path exists only if a venue’s documentation offers it, with its source and date; extra hops are stated assumptions until measured; an unaligned endpoint is reported, never silently accepted.
Acceptance tests. code/firm/privlink/tests/: the catalogue’s sources, the alignment check, the order of the paths’ medians, and the costs by hand.
Stretch. Read endpoint interfaces and their zones from the provider’s interface; add the venue’s rate limits per path.
Sources and further reading
- AWS documentation: VPC peering, PrivateLink and its pricing, Network Load Balancers; AWS public price list (September 2026).
- Coinbase Developer Documentation, Derivatives connectivity; AWS for Industries blog, “One Trading and AWS: Cloud-native colocation for crypto trading” (December 2023).
18.7 Exercises
Exercise 18.1 ★
What does one private endpoint cost a month in one zone in Tokyo, before any data?
Solution
Solution of Exercise 18.1.
USD a month.
Exercise 18.2 ★
What is the difference between peering and a private endpoint, for the venue?
Solution
Solution of Exercise 18.2.
Peering joins the venue’s network to each customer’s: the venue must coordinate address spaces and routes with every one of them and trusts their routing. An endpoint service publishes one load balancer to any number of customers, who each get an interface in their own network; the venue’s network stays closed.
Exercise 18.3 ★
Why does a shared cluster placement group bring the market maker closer, while an endpoint does not?
Solution
Solution of Exercise 18.3.
The placement group decides where the market maker’s instances are launched: in the same high-bisection segment as the venue’s machines. An endpoint decides only the route from wherever the instance already is.
Exercise 18.4 ★★
Your instance is in apne1-az4; the venue’s endpoint has interfaces in apne1-az1 and apne1-az2. What do you do?
Solution
Solution of Exercise 18.4.
The endpoint has no interface in your zone: every packet will cross a zone boundary. Find out where the venue’s gateways are (their zone identifier); if they are in az1 or az2, move your instances there; if the venue can add an interface in az4 and its gateways are in az4, ask for it.
Exercise 18.5 ★★
Why is the public path through an edge network slower than every private one, even inside the same region?
Solution
Solution of Exercise 18.5.
It leaves the private network for the provider’s edge, terminates at a point of presence, and is carried back to the origin through more equipment (and usually a TLS termination and a load balancer); in the model that costs against tens of microseconds for the private hops.
Exercise 18.6 ★★
A venue runs in a Chicago data centre and offers PrivateLink. Why would a firm in the same data centre still buy a cross-connect?
Solution
Solution of Exercise 18.6.
Because in that building the cross-connect is metres of fibre straight to the venue’s network, while PrivateLink goes out to the cloud provider’s region and back; the venue’s own documentation recommends cross-connects for the lowest and most stable latency.
Exercise 18.7 ★★★
Coding. With firm.privlink, find the endpoint-hop time at which a same-zone endpoint’s median equals plain peering’s 99th percentile.
Solution
Solution of Exercise 18.7.
About of endpoint hops: the same-zone endpoint’s median then reaches plain peering’s 99th percentile, .
Exercise 18.8 ★★★
Find the flaw. “We use the venue’s private endpoint, so our orders take the fastest path available.”
Solution
Solution of Exercise 18.8.
A private endpoint is private, not necessarily fast: it adds hops, it may be served from another zone, and a shared placement group or plain peering, where the venue offers them, are faster. “Private” says who can see the traffic, not how long it takes.
18.8 Problem: The Endpoint in the Wrong Zone
Problem 18.1
Weekend problem — what the wrong zone costs
A market maker reaches a venue through the venue’s private endpoint. Its instances are in one zone; the endpoint serves it from another. Messages are 400 bytes (an order and its acknowledgement); the model’s endpoint hops take .
Part I — The round trip.
- What are the median and 99th-percentile round trips through a same-zone endpoint?
- And through the endpoint in another zone?
- How much does the wrong zone add to each?
- How does that compare with the step from peering to a same-zone endpoint?
Part II — The cost.
- What does a million messages cost through each endpoint?
- How much of the difference is cross-zone transfer?
- What do ten billion messages a month cost through each?
- What do the endpoint-hours cost in one zone and in three?
Part III — The fix.
- How does the firm find out that it is in the wrong zone?
- What are its options if the venue’s endpoint has no interface in its zone?
- What would a shared cluster placement group give it?
- What does Proposition 18.3 say about moving the endpoint instead of the instances?
Part IV — The verdict.
- State the named result: the added latency and data-processing cost per million messages of a private endpoint served from another zone against the same zone.
- Which inputs are documentation, which measurement, which assumption?
- Why is private connectivity’s price not a reason to hesitate?
- What should the venue publish to prevent the mistake?
- How often should the firm re-check?
- What does this problem have in common with chapter 9’s cable coils?
- What would change for a venue in a data centre?
- In one sentence: what does a private endpoint guarantee, and what does it not?
Solution
Solution of Problem 18.1.
Part I.
- 310 and .
- 595 and .
- to the median, to the 99th percentile.
- Seven times the step from peering to a same-zone endpoint.
Part II.
- 0.004 USD through the same-zone endpoint, 0.012 through the other.
- All of it: directions USD.
- USD and USD a month.
- 10.22 USD in one zone, 30.66 in three.
Part III.
- By comparing its instances’ zone identifiers with those of the endpoint’s interfaces, and by measuring: a median near where 300 was expected is the sign.
- Move its instances to a zone where the endpoint has an interface (if the venue’s gateways are there), ask the venue for an interface in its zone, or use another path the venue offers (peering, a shared placement group).
- The venue’s own segment of the network: about of median round trip in the model, the best of all.
- That moving the endpoint helps only if the venue’s gateways are in the firm’s zone; otherwise the boundary is crossed anyway, and the instances must move.
Part IV.
- Named result: served from another zone, the private endpoint adds about to the median round trip (and to the 99th percentile) and 0.008 USD per million 400-byte messages of cross-zone transfer, on top of 0.004 USD of data processing.
- Documentation: the paths, the zone behaviour, the prices. Measurement: chapter 16’s round trips. Assumptions: the endpoint hops, the message size, the shared-cluster median.
- Because it costs cents per million messages and tens of dollars a month: its price is negligible next to what the microseconds are worth.
- The zone identifiers of its gateways and of its endpoint’s interfaces, per environment.
- After every relaunch, after the venue’s maintenance, and continuously by measurement (chapter 17).
- Both are about where the customer’s path runs relative to the venue: in a hall the venue equalises the paths; in a cloud region nobody does, and the customer must find the short one.
- The path would be a cross-connect in the building (chapter 9), and the zone question would disappear.
- It guarantees that traffic stays on the provider’s private network, not that it takes the shortest path or stays in one zone.
18.9 Interview questions
Interview question 18.1 ★ developer
What is the difference between VPC peering and PrivateLink?
Solution
Solution of Interview question 18.1.
Peering routes between two whole networks; PrivateLink exposes one service (behind a load balancer) through an interface in the consumer’s network, without routing between them. Peering has fewer hops; PrivateLink scales to many consumers and keeps the provider’s network closed.
What the interviewer is looking for: Routing against service exposure; hops; who controls what.
Interview question 18.2 ★★ developer
How would you verify that your private connection to a venue does not cross an availability-zone boundary?
Solution
Solution of Interview question 18.2.
Compare the zone identifiers (not names) of the instances with those of the endpoint’s interfaces and the venue’s gateways; check the load balancer’s cross-zone setting; and measure: a cross-zone round trip is visibly longer.
What the interviewer is looking for: Identifiers; load-balancer behaviour; measurement.
Interview question 18.3 ★★ developer, trader
A crypto venue offers four access tiers. How do you choose, and what do you ask for?
Solution
Solution of Interview question 18.3.
By latency need against cost and eligibility: a shared placement group or peering if the strategy races, an endpoint if it needs privacy and reasonable speed, the public path otherwise. Ask for the zones, the rate limits per tier, the gateways’ capacity, and the eligibility terms.
What the interviewer is looking for: Tiers mapped to strategies; zones; rate limits; terms.
Interview question 18.4 ★★ developer
What adds latency in a private-endpoint path, and how would you measure each piece?
Solution
Solution of Interview question 18.4.
The instance’s stack, the endpoint interface, the load balancer, any cross-zone hop, the venue’s gateway. Timestamp packets in hardware at the instance, compare with the venue’s acknowledgement timestamps (with care for its clock, chapter 20), and vary one piece at a time (zone, path).
What the interviewer is looking for: Decomposition; hardware timestamps; controlled experiments.
Interview question 18.5 ★★ trader
Is a shared placement group with the venue fair to other market participants?
Solution
Solution of Interview question 18.5.
It is fair if it is offered on published, non-discriminatory terms to every participant who meets them, as colocation must be (chapter 9); it is not if it is a private arrangement. The question is the venue’s conditions, not the technology.
What the interviewer is looking for: Equal conditions within a service; published terms; the colocation analogy.
Interview question 18.6 ★★★ developer
Design the connectivity to a venue that runs in two zones of one region, for both speed and resilience.
Solution
Solution of Interview question 18.6.
Instances in both zones, each connected to the venue’s gateways in its own zone (endpoint interfaces or peering in each), with order routing that prefers the zone of the venue’s primary matching engine and fails over to the other; measure both paths continuously and test the fail-over.
What the interviewer is looking for: Zonal alignment; active paths in both zones; fail-over; measurement.