Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Stateless of HTTP

Shulou Source: shulou.com Published: 2022-06-03 05:03:55 10月02日 Update

HTTP is stateless.

Benefits:

Because the server does not have "memory ability", it does not need additional resources to record status information, which is not only easier to implement, but also lightens the burden on the server, and can use more CPU and memory to provide services.

Moreover, "stateless" also means that the servers are all the same, and there is no difference in "state", so it is easy to form a cluster and let the load balancer forward requests to any server without processing errors due to inconsistent states. use the "stupid method" of "heap machine" to easily achieve high concurrency and high availability.

Disadvantages:

Since the server does not have "memory ability", it cannot support "transaction" operations that require multiple consecutive steps. For example, e-commerce shopping, first to log in, and then add shopping cart, and then order, settlement, payment, this series of operations need to know the identity of the user, but the "stateless" server does not know that these requests are interrelated.

However, Cookie technology can solve this problem.

Tags: Services status servers capabilities memory shopping same consistent balanced transactions information memory methods disadvantages multiple benefits differences technology more machines Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker MySQL Huawei Xiaomi MariaDB