How does XState scale on a Websocket server? #3775
Unanswered
gabrielmedici
asked this question in
General
Replies: 1 comment
-
That's a good question and I don't have an exact answer yet. Actors (interpreted machines) should be lightweight in theory. If you can make a small example app, we can more accurately benchmark this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Imagine a regular Websocket server, with a regular amount of clients connected (let's say 1000) and a regular amount of messages being exchanged with each client.
How well would XState scale, in terms of performance and memory consumption if each client had it's own instance of a state machine?
Each message exchanged may or may not change the state, and if it changes, the following state may or may not invoke a service and the other XState stuff that can happen.
I'm assuming machines are instanced with the
interpret
method. I don't know if there is a better way in this kind of situation (i'm very new to XState). If there is, please share :)Beta Was this translation helpful? Give feedback.
All reactions