forked from docs/doc-exports
Reviewed-by: Hajba, László Antal <laszlo-antal.hajba@t-systems.com> Co-authored-by: zhoumeng <zhoumeng35@huawei.com> Co-committed-by: zhoumeng <zhoumeng35@huawei.com>
3.3 KiB
3.3 KiB
How Do I Test Sticky Sessions Using Linux Curl Commands?
- Prepare required resources.
- Create three ECSs, one as the client and the other two as backend servers.
- Create a load balancer and add an HTTP listener to the load balancer. Enable sticky sessions when you add the listener.
- Start the HTTP service of the two backend servers.
Log in to a backend server and create a file named 1.file in the current directory to mark this server.
Run the following command in the current directory to start the HTTP service:
nohup python –m SimpleHTTPServer 80 &
Run the following command to check whether the HTTP service is normal:
curl http://127.0.0.1:80
Log in to the other backend server and create a file named 2.file in the current directory.
Run the following command in the current directory to start the HTTP service:
nohup python –m SimpleHTTPServer 80 &
Run the following command to check whether the HTTP service is normal:
curl http://127.0.0.1:80
Parent topic: Sticky Sessions