Skip to content

kartikkhk/elasticsearch-benchmarks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elasticsearch Benchmarks

Setup

  • To setup elasticsearch on your system run: docker-compose up -d
  • To run the node server: cd node -> npm ci -> npm start
  • To setup k6 go through: setup-k6-docs

API Reference

Run in Postman

Curl requests

  • Write:
curl --location --request POST 'http://localhost:3000/write' \
--header 'Content-Type: application/json' \
--data-raw '{
    "postId": 100,
    "id": 500,
    "name": "ex eaque eum natus",
    "email": "Emma@joanny.ca",
    "body": "perspiciatis quis doloremque veniam nisi eos velit sed id totam inventore voluptatem laborum et eveniet aut aut aut maxime quia temporibus ut omnis"
}'
  • Read:
curl --location --request GET 'http://localhost:3000/read?keyword=dignissimos'

Loadtest

  • Please install k6 before running loadtests on your local system. setup-k6-docs
  • To run a loadtest for writes: k6 run --vus 10 --duration 30s scripts/write-loadtest.js
  • To run a loadtest for reads: k6 run --vus 10 --duration 30s scripts/read-loadtest.js
  • Please note that vus refers to virtual users and duration is the amount of time you want to run the load test for.

About

Reference for Elasticsearch benchmarking with NodeJS and Golang (Fiber)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •