ScaleEdit on GitHub
Sync Gateway Admin REST API: Go Python
Couchbase Lite REST API: Java C# Swift Python
In this lesson you'll learn how to scale Sync Gateway and Couchbase Server in real-time with zero downtime.
Three instances with the following:
- Centos 7
- RAM >= 2GB
This lesson contains some scripts to automatically deploy and configure Sync Gateway with Couchbase Server. Download those scripts on each VM using wget.
ssh email@example.com wget https://cl.ly/1q300A3v3R1D/deploy.zip sudo yum install -y unzip unzip deploy.zip
Throughout this lesson, you will use different scripts located in the deploy folder.
In this lesson you will deploy a 3rd Sync Gateway node behind the reverse proxy.
Similarly to previous lessons you will first deploy Sync Gateway with the configuration file passing the IP of the VM running Couchbase Server.
There will be 3 Sync Gateway nodes but the reverse proxy is forwarding the load to only 2 of them. To balance the traffic across all 3 you must update the NGINX config file with the IP of VM5.
- Log on VM5 (sync-gateway).
Run the Sync Gateway install latest script passing the IP of VM1 where Couchbase Server is running.
sudo ./install_latest_sync_gateway.sh VM1
Log on VM4 (nginx).
Run the NGINX install script passing the IP of VM2, VM3 and VM4 where the Sync Gateway instances are running.
sudo ./configure_nginx.sh VM2 VM3 VM5
Send a curl request to http://localhost:8000. This will return information about the running sync_gateway behind the reverse proxy.
Well done! You've completed this lesson on scaling. Feel free to share your feedback, findings or ask any questions on the forums.