Quantitative Finance · Book 14 · Technology

Networks, Hardware and Trading Infrastructure

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 285 µs285\,\text{µ}\mathrm{s} 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”.

Three ways from a firm’s instance to a venue in the same cloud region, schematically: peering between the two virtual networks, a private endpoint (an interface in the firm’s network, a load balancer in front of the venue’s gateways), and the public endpoint through an edge network.
Figure 18.1. Three ways from a firm’s instance to a venue in the same cloud region, schematically: peering between the two virtual networks, a private endpoint (an interface in the firm’s network, a load balancer in front of the venue’s gateways), and the public endpoint through an edge network.

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. ∎

The endpoint in the wrong zone, schematically: the venue’s gateways in az1, its endpoint’s interfaces in az1 and az2, the firm’s instance in az4; the firm’s packets enter the interface in az2 and cross to the gateways through the load balancer. No placement of the endpoint keeps this path in one zone (); moving the instance to az1 does. Zone labels are identifiers, not names.
Figure 18.2. The endpoint in the wrong zone, schematically: the venue’s gateways in az1, its endpoint’s interfaces in az1 and az2, the firm’s instance in az4; the firm’s packets enter the interface in az2 and cross to the gateways through the load balancer. No placement of the endpoint keeps this path in one zone (Proposition 18.3); moving the instance to az1 does. Zone labels are identifiers, not names.
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
Listing 18.1. A path’s round trip (the body of chapter 16’s model plus the documented extra hops), the zone check, and the costs. code/firm/privlink/firm_privlink.py

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 200 µs200\,\text{µ}\mathrm{s}.

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.

Pathp50p99Cost per millionFixed per zone
(µs\text{µ}\mathrm{s})(µs\text{µ}\mathrm{s})messages (USD)(USD a month)
Peering, shared cluster placement15022000
Peering, same zone27039600
Private endpoint, same zone3104360.00410.22
Private endpoint, other zone5957970.01210.22
Public endpoint via an edge2 2702 39600
Table 18.1. Simulation of the documented paths in one region: chapter 16’s fitted round trips (the shared cluster taken at the AWS blog’s “sub-150 µs”), plus an assumed 40 µs40\,\text{µ}\mathrm{s} for the endpoint and load-balancer hops and 2 ms2\,\mathrm{m}\mathrm{s} for the public edge; costs from the dated prices, for 400 bytes per message (an order and its acknowledgement). Data: nw_private.path_rows().
Simulation: median and 99th-percentile round trips of the five paths of . The endpoint in the wrong zone costs as much as the step from peering to the endpoint several times over; the public edge costs milliseconds. Data: fig_private.py.
Figure 18.3. Simulation: median and 99th-percentile round trips of the five paths of Table 18.1. The endpoint in the wrong zone costs as much as the step from peering to the endpoint several times over; the public edge costs milliseconds. Data: fig_private.py.
The monthly cost of one private endpoint in one zone against message volume, from the dated prices: 10.22 USD of endpoint-hours plus data processing, and cross-zone transfer when the endpoint serves another zone. Ten billion messages a month cost 50 or 130 USD. Data: fig_private.py.
Figure 18.4. The monthly cost of one private endpoint in one zone against message volume, from the dated prices: 10.22 USD of endpoint-hours plus data processing, and cross-zone transfer when the endpoint serves another zone. Ten billion messages a month cost 50 or 130 USD. Data: 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}
Listing 18.2. The named result: what the other zone adds to the round trip and to the cost per million messages. code/networks/18-private-connectivity-to-crypto-venues/python/nw_private.py

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 285 µs285\,\text{µ}\mathrm{s} to the median round trip and 360 µs360\,\text{µ}\mathrm{s} 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)

  1. 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.
  2. Resolve the zone identifiers of your instances and of the venue’s endpoint interfaces; place instances in the zone of the venue’s gateways.
  3. 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.
  4. Measure each path’s round trip with hardware timestamps; keep the public path as a fallback, and know its latency.
  5. 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.

  1. Paths. firm_privlink.load_paths reads data/paths.csv: each documented path with its extra hops, its prices and its sources.
  2. Round trips. rtt_percentiles (Listing 18.1) adds the hops to chapter 16’s body models.
  3. Alignment. aligned compares the instance’s zone identifier with the endpoint’s; nw_private.ALIGN is a failing example.
  4. Costs. cost_per_million and monthly_fixed; monthly_curve draws the cost against volume.

What to change next. Replace the assumed 40 µs40\,\text{µ}\mathrm{s} 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.

0.014×730=10.220.014 \times 730 = 10.22 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 2 ms2\,\mathrm{m}\mathrm{s} 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 126 µs126\,\text{µ}\mathrm{s} of endpoint hops: the same-zone endpoint’s median then reaches plain peering’s 99th percentile, 396 µs396\,\text{µ}\mathrm{s}.

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 40 µs40\,\text{µ}\mathrm{s}.

Part I — The round trip.

  1. What are the median and 99th-percentile round trips through a same-zone endpoint?
  2. And through the endpoint in another zone?
  3. How much does the wrong zone add to each?
  4. How does that compare with the step from peering to a same-zone endpoint?

Part II — The cost.

  1. What does a million messages cost through each endpoint?
  2. How much of the difference is cross-zone transfer?
  3. What do ten billion messages a month cost through each?
  4. What do the endpoint-hours cost in one zone and in three?

Part III — The fix.

  1. How does the firm find out that it is in the wrong zone?
  2. What are its options if the venue’s endpoint has no interface in its zone?
  3. What would a shared cluster placement group give it?
  4. What does Proposition 18.3 say about moving the endpoint instead of the instances?

Part IV — The verdict.

  1. 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.
  2. Which inputs are documentation, which measurement, which assumption?
  3. Why is private connectivity’s price not a reason to hesitate?
  4. What should the venue publish to prevent the mistake?
  5. How often should the firm re-check?
  6. What does this problem have in common with chapter 9’s cable coils?
  7. What would change for a venue in a data centre?
  8. In one sentence: what does a private endpoint guarantee, and what does it not?
Solution

Solution of Problem 18.1.

Part I.

  1. 310 and 436 µs436\,\text{µ}\mathrm{s}.
  2. 595 and 797 µs797\,\text{µ}\mathrm{s}.
  3. 285 µs285\,\text{µ}\mathrm{s} to the median, 360 µs360\,\text{µ}\mathrm{s} to the 99th percentile.
  4. Seven times the 40 µs40\,\text{µ}\mathrm{s} step from peering to a same-zone endpoint.

Part II.

  1. 0.004 USD through the same-zone endpoint, 0.012 through the other.
  2. All of it: 0.4 GB×0.01×20.4~\mathrm{GB} \times 0.01 \times 2 directions =0.008= 0.008 USD.
  3. 10.22+40=50.2210.22 + 40 = 50.22 USD and 10.22+120=130.2210.22 + 120 = 130.22 USD a month.
  4. 10.22 USD in one zone, 30.66 in three.

Part III.

  1. By comparing its instances’ zone identifiers with those of the endpoint’s interfaces, and by measuring: a median near 600 µs600\,\text{µ}\mathrm{s} where 300 was expected is the sign.
  2. 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).
  3. The venue’s own segment of the network: about 150 µs150\,\text{µ}\mathrm{s} of median round trip in the model, the best of all.
  4. 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.

  1. Named result: served from another zone, the private endpoint adds about 285 µs285\,\text{µ}\mathrm{s} to the median round trip (and 360 µs360\,\text{µ}\mathrm{s} 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.
  2. 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.
  3. Because it costs cents per million messages and tens of dollars a month: its price is negligible next to what the microseconds are worth.
  4. The zone identifiers of its gateways and of its endpoint’s interfaces, per environment.
  5. After every relaunch, after the venue’s maintenance, and continuously by measurement (chapter 17).
  6. 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.
  7. The path would be a cross-connect in the building (chapter 9), and the zone question would disappear.
  8. 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.

Terms defined in this chapter

See all 2333 terms in the glossary