Why Use Stanza?
Stanza solves a lot of common reliability problems. It does this in a way that most benefits the users of your software.
We can help if you have had problems with:
- rate-limited services like Stripe, Shopify or GitHub
- Ensuring the most important parts of your application continue to work during high load
- Protecting Redis/Postgres from instability and errors caused by high load.
We can help you if you'd like the capability to:
- Gracefully degrade user interfaces when underlying services like caches or database replicas are impaired
- Communicating with users about what is happening - right in the application.
Any time you've reliability or scaling challenges caused by user behavior or traffic, we can help.
How does it work?
At heart, Stanza is a traffic management tool. On the front-end, Stanza UI Toolkit lets developers define the feature an HTTP request supports (is this the most important thing in the app, or a widget?), and uses that information to make sure the important stuff happens reliably and fast. On the back end, the Stanza SDK uses a middleware-based approach to intercept your HTTP requests (traffic), and makes good decisions about what to do with them.
In addition, Stanza is a two way street!
When Stanza detects that a back end service is approaching it's limits in ability to serve requests, it begins to slow or drop low priority requests. At the same time, it lets the UI know that these failures are occurring. The Stanza UI toolkit responds to degredation messages from the back end by stopping requests from low prioirty UI components - quietly or with optional custom error messages - saving the user from waiting and wondering.
Requests come to the back-end, and fail randomly, regardless of importance. Users wonder what happened.
Requests come to the back-end, and the most important ones continue to succeed! Users get automatic helpful info about why things seem off.
Because requests are stopped at the client, we avoid server-side infrastructure backups that would historically cause costly autoscaling and big slowdowns.
Unlike most traffic solutions out there, Stanza uses libraries to provide functionality. This has several advantages, including ease of debugging and ability to manage traffic in PaaS and other non-sidecar friendly environments.
Stanza libraries can be divided in two categories:
UI Toolkitlibraries run in the browser, helping the client be a cooperative part of the overall infrastructure. They annotate data, and help to adapt the UI to failure modes.
Stanza SDKsrun in server-side code, typically as middleware. They read request metadata and use it to prioritize requests under load. They also emit telemetry to Stanza to help detect problems before the user does.
Stanza is most powerful when front-end and back-end are working together, but we know that can be easier said than done! Stanza has stand-alone modes for front and back end.
With just the
UI toolkit, you can integrate Stanza into your front end code to build adaptive UIs based on features. This enables you to:
- Turn off features when there is an outage, and remove them from the UI
- Push custom error messages to users, inline in the UI
With just a
Stanza SDK, you can integrate Stanza into your back end code and define Stanza features. This enables you to:
- Load shed low prioirty featuers when approaching infrastructure limits
Stanza back-end functionality depends on forwarding of W3C baggage across services.
Stanza is not monitoring software - but it does need information about requests so that it can correctly prioritize them! We pass information like feature on the W3C Baggage (opens in a new tab) header. If a back end service has a Stanza SDK Middleware, we will make sure that baggage is forwarded according to the specification. If a request passes through a service that doesn't have Stanza, baggage must be forwarded another way. The good news is, you can use pretty much any distributed tracing library to do this. Baggage will be correctly forwarded by:
- Any Open Telemetry (opens in a new tab) distributed tracing library. The following distributed tracing providers leverage Open Telemetry libraries:
- DataDog Distributed Tracing (opens in a new tab)
- Sentry Performance (opens in a new tab)
If you are already distributed tracing - you're probably good! If you are not, try it - it's amazing!