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

Undocumented shards/replicas configuration for Elasticsearch Exporter #3745

Open
falko opened this issue Apr 30, 2024 · 4 comments
Open

Undocumented shards/replicas configuration for Elasticsearch Exporter #3745

falko opened this issue Apr 30, 2024 · 4 comments
Assignees
Labels
component:self-managed Docs and issues related to Camunda Platform 8 Self-Managed component:zeebe Issues related with Zeebe project

Comments

@falko
Copy link
Member

falko commented Apr 30, 2024

According to the configuration file there are properties for configuring sharding and replicas:
https://github.com/camunda/zeebe/blob/42cc7744e88ad4aac655f115a8a270f0556e6432/dist/src/main/config/broker.yaml.template#L665-L666

But they are not shown in the documentation:

| Option | Description | Default |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
| prefix | This prefix will be appended to every index created by the exporter; must not contain `_` (underscore). | zeebe-record |
| createTemplate | If `true` missing indexes will be created automatically. | `true` |
| indexSuffixDatePattern | This suffix will be appended to every index created by the exporter; The pattern is based on the Java [DateTimeFormater](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/format/DateTimeFormatter.html) and supports the same syntax. This is useful when indexes should be created in a different interval, like hourly instead of daily. | `"yyyy-MM-dd'"` |

And their behavior is not explained anywhere.

@falko
Copy link
Member Author

falko commented Apr 30, 2024

@daniel-ewing pointed out that the name of the corresponding environment variables may be hard to guess:

zeebe: 
  env: 
    - name: ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_INDEX_NUMBEROFSHARDS
      value: "1"

ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_INDEX_NUMBER_OF_SHARDS does not work.

@falko
Copy link
Member Author

falko commented Apr 30, 2024

It may also be work documenting that the sharding configuration can be checked with an Elasticsearch query like:

curl --location 'http://127.0.0.1:9200/_cat/indices/zeebe*?v=true&s=index&pretty'

@akeller akeller added component:self-managed Docs and issues related to Camunda Platform 8 Self-Managed component:zeebe Issues related with Zeebe project labels Apr 30, 2024
@falko
Copy link
Member Author

falko commented May 2, 2024

@jothikiruthika and I discovered that the Elasticsearch Exporter creates indices with inconsistent number of shards.

Getting this wrong in the beginning may cause difficult migrations later. Therefore, this topic should be much better documented. The recommendation for maximum performance would be to set the environment variable ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_INDEX_NUMBEROFSHARDS to match the number of Elasticsearch nodes. However, high availability can be reached by increasing the number of replicas. Maybe it would be helpful to link to some Elasticsearch documentation for more details on the topic. At least, we must make customers aware of these options and their effects.

@megglos megglos added component:docs Documentation improvements, including new or updated content and removed component:docs Documentation improvements, including new or updated content labels May 6, 2024
@megglos megglos self-assigned this May 6, 2024
@megglos
Copy link
Contributor

megglos commented May 7, 2024

Many thanks for raising this @falko !

I raised a PR to document these properties now #3773 and would consider this enough to close this issue.

@daniel-ewing pointed out that the name of the corresponding environment variables may be hard to guess:

zeebe:
env:
- name: ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_INDEX_NUMBEROFSHARDS
value: "1"
ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_INDEX_NUMBER_OF_SHARDS does not work.

This appears like a general issue to me that I consider worth a separate issue. Could either you or @daniel-ewing raise this to the docs repo so we can address that separately?

It may also be work documenting that the sharding configuration can be checked with an Elasticsearch query like:

curl --location 'http://127.0.0.1:9200/_cat/indices/zeebe*?v=true&s=index&pretty'

imho this goes beyond the scope of documenting the exporters but might fit a guide around the topic but I couldn't find any existing guide related to tuning elastic/opensearch shard configs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:self-managed Docs and issues related to Camunda Platform 8 Self-Managed component:zeebe Issues related with Zeebe project
Projects
None yet
Development

No branches or pull requests

3 participants