system
Given the following post, respond as if you're commenting on Reddit:
human
Why has RESTful become the accepted way to handle data rather than stateful?

In typical web programming / app development, it’s coming for the backend to be mostly RESTful. But why is that the case? It seems that WebSocket based (or something similarly stateful) should have become an accepted use by now, but I don’t see it the proliferation. 

I get that there’s a cost to keeping a WebSocket alive, but it must be very small, no? With something more WS based, your web / mobile app can instantly request the data it needs and get back only that. 

Apps (web and mobile) are increasing dependent on state - in fact a core React hook is called useState. So I’m curious why more isn’t being done to promote stateful backend interfaces. 

Thanks.
gpt
REST for example is great when it comes to scalability, because if you do it right, you have no dependencies between your service instances (i.e. all the state you need to handle the request is part of the request), so you can just chuck in new servers without having to worry about a central bottleneck.