Skip to main content

Routing

For every request, Lasso finds the providers in the profile that can serve it, orders them by your strategy, and fails over to the next one when an error is safe to retry. You choose the strategy per call site in the URL.

How a provider is chosen

  1. Find candidates. Providers in the profile that serve the chain and transport. Known method gaps, history limits and range limits move a provider that can’t serve the request to the back; Lasso never drops the last route.
  2. Order by health. Providers with an open circuit are skipped. Healthy providers come before rate-limited or recovering ones, and providers behind the requested block wait behind those at the head.
  3. Order by strategy. Within each health group, your strategy sets the order.
  4. Send, and fail over. A read that fails in a way that’s safe to retry moves to the next provider, within one request deadline.

Choose a strategy

A URL without a strategy uses balanced-fast on Premium and load-balanced on other profiles. latency-weighted is an alias of balanced-fast. Latency is measured in the region serving you, per provider, transport and kind of request (a family of related methods). Premium and Custom serve all four strategies. public, payment fallback and free access serve load-balanced, and lasso_meta.strategy reports what was used. On premium, strategies price differently.

What failover covers

A profile never borrows providers from another pool. Pin one provider with <base>/provider/<name>/<chain> to debug it; a pin has no failover.

Trial it against your current endpoint

  1. Send the same mix of your app’s real methods through your current endpoint and through Lasso, from the regions you deploy in.
  2. Compare success rate, p50, p95 and p99 latency, and head freshness. A lower mean alone doesn’t show the tail improved.
  3. Add ?include_meta=body to see selected_provider, retries, upstream_latency_ms and lasso_overhead_ms for each request. See routing evidence.
  4. Force the failure you need to survive, such as throttling or stopping one of your own nodes, and confirm your requests keep succeeding.
Lasso’s routing engine adds under 1.1 ms at p95 at 10,000 requests per second; see the routing overhead benchmark.

When Lasso’s own systems fail

Each node routes from its last-known keys, profiles and provider state, so a database, billing or metering outage doesn’t refuse requests. Changes made during the outage take effect once the node can read them.

Limits

  • load-balanced spreads load across healthy providers, not evenly: if only one is healthy, it takes nearly every first attempt.
  • fastest can concentrate traffic on one provider for one kind of request.
  • A provider without recent measurements isn’t assumed fast or slow; it’s tried after measured ones.
  • Failover helps only when providers overlap on the method, history and chain you need. Two URLs on the same provider account can fail together.

Next