View Code? Open in Web Editor
NEW
Experiment implementing express API with elasticsearch as backend
experiment-sidebar-elastic's Introduction
EXPERIMENT ELASTIC EXPRESS
- 'migrate.js' -> migration from mysql table into elasticsearch index
- API '/inboxes/:id/:page_count/:from' -> attempt to simulate 'Inboxes' query in Mobile API v1
- clone this repo
- docker compose up
- Try to check
localhost:9200
. if it didn't shows anything, check "Troubleshoot" section below
- To run the express app, execute
docker compose exec app npm run start:dev
- we provided
performance_test
folder which contain k6 scripts to run performance test against this API
- requirements:
- k6 & nodejs installed locally (without docker)
- how to run: from root of this repo run
node ./performance_test/run_all.js
experiment-sidebar-elastic's People
Contributors
Watchers
experiment-sidebar-elastic's Issues
features to be implemented
-
create seeder using elastic's bulk feature. bulk feature allows inserting lots of data quickly
ref: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/7.17/bulk_examples.html
-
migrate data from mysql to elastic. need to have proper mapping for it to works. may also need bulk feature as mentioned above
- after that need to do benchmarking to compare performances & accuracy againts mysql
-
experiment with pagination, specifically cursor based pagination