My code mania 110 demo.
I had a talk at the event named "Code Mania 110: Moving Forward, Open-Source world".
My session is "เป็นมากกว่า Memcached, ktserver".
I would introduce how 'ktserver':
- could save your life on the memcache problem, data lost.
- help you improve data scalability performance.
The session was recorded and shared on Youtube as shown below.
URL: https://www.youtube.com/watch?v=tBdeUOeREMA
Create docker network run create_network.sh
in each linux box
sh create_network.sh
Run master-1
at server-1
and master-2
at server-2
# server-1
cd master-1
sh run-master-1.sh
# server-2
cd master-2
sh run-master-2.sh
Run php app at server-1,2,3,4,...
cd php
# save session to file
sh run-ph.sh
# save session to memcached cluster
sh run-php-share-session.sh
Run slave-1
at server-3
and slave-2
at server-4
# server-3
cd slave-1
sh run-slave-1.sh
# server-4
cd slave-2
sh run-slave-2.sh
Run nginx reverse proxy server
cd nginx
sh run-proxy.sh
Using curl
to login and save cookie to file
curl -i localhost:8080/login.php?username=demo -c cookies.txt
while true; do clear; curl -i localhost:8080 -b cookies.txt; echo; echo "Ctrl+C to exit"; sleep 2; done
# run php with share session at `server-1,2,3,4,...`
# remove and run docker all server
docker rm -f php_app
cd php
sh run-php-share-session.sh
Test with curl
again and see what happen.
Enjoy ktserver!