If REST applications are supposed to be stateless, how do you manage sessions?

前端 未结 16 1201
既然无缘
既然无缘 2020-11-22 10:23

I\'m in need of some clarification. I\'ve been reading about REST, and building RESTful applications. According to wikipedia, REST itself is defined to be Representation

16条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-22 10:49

    You are absolutely right, supporting completely stateless interactions with the server does put an additional burden on the client. However, if you consider scaling an application, the computation power of the clients is directly proportional to the number of clients. Therefore scaling to high numbers of clients is much more feasible.

    As soon as you put a tiny bit of responsibility on the server to manage some information related to a specific client's interactions, that burden can quickly grow to consume the server.

    It's a trade off.

提交回复
热议问题