{"id":16577576,"url":"https://github.com/proddata/nodeingestbench","last_synced_at":"2025-10-29T04:32:19.265Z","repository":{"id":41176818,"uuid":"362743030","full_name":"proddata/nodeIngestBench","owner":"proddata","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-31T15:55:40.000Z","size":97,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T22:23:14.329Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/proddata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-04-29T08:21:35.000Z","updated_at":"2024-04-29T07:34:52.000Z","dependencies_parsed_at":"2024-03-31T16:50:30.429Z","dependency_job_id":null,"html_url":"https://github.com/proddata/nodeIngestBench","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proddata%2FnodeIngestBench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proddata%2FnodeIngestBench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proddata%2FnodeIngestBench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proddata%2FnodeIngestBench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/proddata","download_url":"https://codeload.github.com/proddata/nodeIngestBench/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238768501,"owners_count":19527210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T22:11:28.424Z","updated_at":"2025-10-29T04:32:18.981Z","avatar_url":"https://github.com/proddata.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node.js CrateDB Ingest Benchmark\n\nA multi-process Node.js script to run high-performance ingest benchmarks on CrateDB clusters.\nThe script generates random data and runs batched insert statements against a single table using CrateDB's [HTTP endpoint](https://crate.io/docs/crate/reference/en/latest/interfaces/http.html).\n\nThe top measured performance (single Node.js process, seven-node CrateDB cluster with 30 vCPUs each) was 1,200,000 rows/s.\n\n## Setup\n\n1. Install Node.js using one of the available [installation methods](https://nodejs.org/en/download/current/)\n2. Clone this repository: `git clone https://github.com/proddata/nodeIngestBench.git`\n3. Change into the cloned repository: `cd nodeIngestBench`\n4. Install dependencies: `npm install`\n5. Configure the connection to your CrateDB cluster by creating a `.env` file:\n```bash\nCRATE_HOST=localhost\nCRATE_USER=admin\nCRATE_PASSWORD=secret-password\nCRATE_PORT=4200\nCRATE_SSL=true\n```\n\n## Running benchmarks\n\nStart the benchmarking with `node appCluster.js`. The script takes several optional command-line parameters:\n * `table`: The name of the table used for benchmarking. The table will automatically be created if it doesn't exist yet.\n * `shards`: The number of shards that will be allocated for the table.\n * `replicas`: The number or range of replicas to use for the table.\n * `extra_tags_length`: The number of extra values added to the `tags` object in the table. This can be used to generate a wider table with more columns.\n * `drop_table`: If `true`, the table will be dropped and re-created when running the script.\n * `batch_size`: The number of rows that are inserted as part of a single `INSERT` statement.\n * `processes`: The number of child processes that will be spawned. Each child process inserts data independently.\n * `concurrent_requests`: Each child process will run this number of concurrent queries.\n * `max_rows`: The number of rows after which a child process will terminate. Overall, the (maximum) number of rows that will be inserted is `processes * max_rows`.\n\n## Example\n\nBelow is a basic example that was run on a three-node CrateDB cluster with 10 vCPUs each:\n\n```bash\n$ node appCluster.js --batch_size 20000 --max_rows 1000000 --shards 12 --concurrent_requests 20 --processes 1\n\n-------- Options ---------\n{\n  dropTable: true,\n  processes: 1,\n  batchSize: 20000,\n  maxRows: 6000000,\n  table: 'doc.cpu',\n  shards: 6,\n  concurrentRequests: 20,\n  extraTagsLength: 0,\n  replicas: 0\n}\n--------------------------\n[...]\n-------- Global Results ---------\nTime\t 25.179 s\nRows\t 6,020,000 records\nSpeed\t239,088.13 rows per sec\n---------------------------------\n```\n\nAs each row contains ten numeric metrics, this is equal to a throughput of 2,400,000 metrics/s.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproddata%2Fnodeingestbench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproddata%2Fnodeingestbench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproddata%2Fnodeingestbench/lists"}