Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insertMany nosqlbench workload #784

Merged
merged 4 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nosqlbench/http-jsonapi-search-advanced.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_advanced>>/<<table:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: >2
Expand Down
28 changes: 14 additions & 14 deletions nosqlbench/http-jsonapi-search-basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_basic>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"ok\":1.*"
body: >2
Expand All @@ -103,7 +103,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_basic>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: '.*\"insertedIds\":\[.*\].*'
body: >2
Expand Down Expand Up @@ -147,7 +147,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_basic>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: >2
Expand All @@ -169,7 +169,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_basic>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: >2
Expand All @@ -191,7 +191,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_basic>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: >2
Expand All @@ -213,7 +213,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_basic>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: >2
Expand All @@ -235,7 +235,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_basic>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: >2
Expand All @@ -257,7 +257,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_basic>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: >2
Expand All @@ -279,7 +279,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_basic>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: >2
Expand All @@ -301,7 +301,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_basic>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: >2
Expand All @@ -323,7 +323,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_basic>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: >2
Expand All @@ -345,7 +345,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_basic>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: >2
Expand All @@ -368,7 +368,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_basic>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: >2
Expand All @@ -391,7 +391,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_basic>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: >2
Expand Down
18 changes: 9 additions & 9 deletions nosqlbench/http-jsonapi-search-filter-sort.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_filter_sort>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: |
Expand All @@ -177,7 +177,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_filter_sort>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: |
Expand All @@ -194,7 +194,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_filter_sort>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: |
Expand All @@ -213,7 +213,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_filter_sort>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: |
Expand All @@ -230,7 +230,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_filter_sort>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: |
Expand All @@ -248,7 +248,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_filter_sort>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: |
Expand All @@ -267,7 +267,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_filter_sort>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: |
Expand All @@ -287,7 +287,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_filter_sort>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: |
Expand All @@ -306,7 +306,7 @@ blocks:
uri: <<protocol:http>>://{weighted_hosts}:<<jsonapi_port:8181>><<path_prefix:>>/v1/<<namespace:jsonapi_search_filter_sort>>/<<collection:docs_collection>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "{token}"
Token: "{token}"
Content-Type: "application/json"
ok-body: ".*\"data\".*"
body: |
Expand Down
13 changes: 2 additions & 11 deletions nosqlbench/http-jsonapi-vector-insertmany.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

## Description

The JSON API insertmany Dataset workflow targets Stargate's JSON API using JSON documents from an external dataset.
The [dataset](#dataset) is mandatory and should contain a vector per row that should be used as the input for write, read and update operations.
This workflow is perfect for testing Stargate performance using your own JSON dataset or any other realistic dataset.
The JSON API insertMany(ordered false) performance test workload

In contrast to other workflows, this one is not split into ramp-up and main phases. Instead, there is only the write phase.

Expand All @@ -15,26 +13,19 @@ In contrast to other workflows, this one is not split into ramp-up and main phas
The default scenario for http-jsonapi-vector-insertmany.yaml only has one operation - insert 20 records to the database
a time.

Note that error handling is set to `errors=timer,warn`, which means that in case of HTTP errors the scenario is not stopped.

## Dataset

### Vector Sample

Vector size is 1536 in the nosqlbench file. (openAI embedding vector standard size is 1536)
Sample dataset is in [vector dataset](vector-dataset.txt)

> If you want to test different vector-size, please change [http-jsonapi-vector-crud create-collection op](http-jsonapi-vector-crud.yaml) and [vector dataset](vector-dataset.txt)


## Sample Command

### Against AstraDB

> comment out `create-namespace` op in the [nosqlbench yaml file](http-jsonapi-vector-crud.yaml)

```
nb5 -v http-jsonapi-vector-crud docscount=1000 threads=20 jsonapi_host=Your-AstraDB-Host auth_token=Your-AstraDB-Token jsonapi_port=443 protocol=https path_prefix=/api/json namespace=Your-Keyspace
nb5 -v http-jsonapi-vector-crud docscount=1000 threads=20 jsonapi_host=Your-AstraDB-Host auth_token=Your-AstraDB-Token jsonapi_port=443 protocol=https path_prefix=/api/json keyspace=Your-Keyspace
```

### Against Local JSON API
Expand Down
Loading