Check whether InfluxDB has such significant write throughput difference with Elasticsearch as reported on official Influx Data website. Also check other DBs to improve comparison results
Rules:
- Use write commands that are easy to find.
- Do not search for ways to optimize requests, but use the ones from tutorials.
- Use the same machine for all measurements.
- Reboot machine before each measurement.
- Pull InfluxDB docker image
- Insert data and measure results
- Pull Elasticsearch docker image
- Insert data and measure results
- Add results to my presentation file
- Add steps to reproduce into this README file.
Insert should be the following:
- Data base name/index = mydb
- Measurement/type/table = kinda
- Tag = test
- Thread = thread number [1; 4]
- RandomValue = random number [0; 1000]
- Timestamp = timestamp
- Run the following in terminal:
# Pull image docker pull influxdb:1.6.3 # Launch InfluxDB docker run -p 8086:8086 \ -v $PWD:/var/lib/influxdb \ influxdb:1.6.3 # Create DB # curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb" # that one was deprecated :( # Try this one: curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb" # Check that write functionality is working curl -i -XPOST 'http://localhost:8086/write?db=mydb&precision=ms' \ --data 'kinda,tag=test,thread=1 randomValue=6 1537701253843' # Check write command results curl -G 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT * FROM "kinda"' # {"results":[{"statement_id":0,"series":[{"name":"kinda","columns":["time","randomValue","tag","thread"],"values":[["1970-01-01T00:00:00.9466848Z",6,"test","1"]]}]}]} # Clear DB curl -i -XPOST 'http://localhost:8086/query' -d db=mydb -d q='DELETE from "kinda"' - Open ./jmeter/InfluxDB_Test_Plan.jmx via jMeter
- Run it.
- Check results in listeners (e.g.
Response Time Graph) - Clear DB:
# Clear DB curl -i -XPOST 'http://localhost:8086/query' -d db=mydb -d q='DELETE from "kinda"' - Stop Docker by terminating
docker run...
- Run the following in terminal:
# Pull image docker pull docker.elastic.co/elasticsearch/elasticsearch:6.3.2 # Launch Elasticsearch docker run -p 9200:9200 -p 9300:9300 \ -e "discovery.type=single-node" \ docker.elastic.co/elasticsearch/elasticsearch:6.3.2 # Check that write functionality is working curl -XPOST http://localhost:9200/mydb/kinda \ -H 'Content-Type: application/json' \ --data '{"tag":"test", "thread":1, "randomValue":6, "timestamp":946684800}' # Check write command results curl -G 'http://localhost:9200/_search?q=test' # {"took":129,"timed_out":false,"_shards":{"total":5,"successful":5,"skipped":0,"failed":0},"hits":{"total":1,"max_score":0.2876821,"hits":[{"_index":"mydb","_type":"kinda","_id":"0EwFAmYBg5Z2-3YbKeuu","_score":0.2876821,"_source":{"tag":"test", "thread":1, "randomValue":6, "timestamp":946684800}}]}} # Clear DB curl -XDELETE localhost:9200/* - Open ./jmeter/Elasticsearch_Test_Plan.jmx via jMeter
- Run it.
- Check results in listeners (e.g.
Response Time Graph) - Clear DB:
# Clear DB curl -XDELETE localhost:9200/* - Stop Docker by terminating
docker run...