Skip to content

Why spin instead of conventional web framework? #861

Answered by dicej
mishushakov asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @mishushakov. There are a few reasons that come to mind:

  1. Most conventional web frameworks (e.g. ExpressJS, Axum, etc.) are meant for stateful, long-lived services, where the handler for each request can read and modify shared, in-memory state within the service. There are definitely advantages to that model, but Spin uses a "serverless" model instead, where each request handler runs in its own sandbox (similar to V8 isolates). This kind of isolation provides much stronger security guarantees than a conventional framework, and is also much easier to scale horizontally, especially in combination with a distributed database like CockroachDB or PlanetScale. Also, this isolation is achieve…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mishushakov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants