elastic-cloud-autoscaler-demo
Demo of https://github.com/k-yomo/elastic-cloud-autoscaler
⚠️ Running the demo will cost money.
Prerequisites
Setup
Create Elastic Cloud's API key and set it to env variable.
You can create API key in the below page.
https://cloud.elastic.co/deployment-features/keys
$ export EC_API_KEY=
- Run
setup
command. It'll create required deployments and elasticsearch index.
$ make setup
- Run
index-products
command. It'll index 1.7M documents. The data Shopping Queries Dataset published from Amazon.
$ make index-products
Usage
$ make run
It'll check if scaling is needed and apply the change if any per minute based on the given configuration.
When scaling is applied, it'll print scaling operation like below.
==============================================
scaling direction: SCALING_OUT
topology size updated from: 65536 => to 131072
replica num updated from: 1 => to 3
reason: current or desired topology size '64g' is less than min topology size '128g'
==============================================
To increase CPU util, make loadtest
command will send search requests using k6.
It'll gradually increase traffic and then decrease, so you can see the scale-out and scale-in.
$ make loadtest
Cleanup
cleanup
command will destroy created resources
$ make cleanup