Hi Team,
I just would like to understand the zeebe internal flow, I got few queries, can someone confirm the same,
- ZeebeClient request send
- Gateway accept the request and forward to any partition leader
- Partition leader first append the command in the log file & replicate into follower
- Stream processor process the command and respond
- updated event will be append in the log file & replicate into follower
Queries:
- If I configured my snapshot duration as 10m, Every 10 mints my RocksDB will take a snapshop of these log file
- When I try to fetch current status of the process, my request will fetch the latest state from the RocksDB snapshot or event log
- When I try to deploy my diagram how & when it will get stored into elastic search database ?
- When my exporter fetch the records, all the event logs will be deleted ?
To answer your questions:
- Yes - snapshots are incremental, so this is fairly cheap.
- It depends how you fetch the status of your process. If you fetch it through the Operate API (or the new, soon to be released Camunda REST API), then the latest state is fetched from your history storage. This is either Elasticsearch, or OpenSearch.
- When something is replicated to enough followers, it is processed (as you pointed out), but it’s also exported to your history storage, making it available for a longer (configurable) retention period.
- Not immediately, but sort of: when an entry on the log has been processed and exported, it can be deleted. There’s some logic around it tied to snapshots and segment size, but that’s implementation details. Just assume once it’s been processed and exported, it’s quite likely deleted.
1 Like
Thanks for your quick response @npepinpe
I have doubt in point 2 still,
- When I try to hit below apis, from where the records will get fetch, Is this elasticsearch/snapshot/eventlog
https://jfk-1.operate.camunda.io/{clusterId}/v1/variables/search
https://jfk-1.tasklist.camunda.io/{clusterId}/v1/tasks/search
Hello @vinothkumar
When you use the Tasklist or Operate API to retrieve data, it fetches the data from Elasticsearch.
Thanks @Kaveri_Govindasamy . Okay. So always my above mentioned APIs are fetched from snapshots ?
In this case, I have a scenario where my workflow instance will take 3 months to get completed. So the whole 3 months my event data is present in the Snapshots or Event logs ?
And also I have a doubt the snapshots will created for each request sending from zeebeclient ?
Yes, data is removed from the history storage (e.g. ES) only if the associated process instance is completed, and it was completed at least 30 days ago (30 days being the default retention, but that’s configurable).
Sorry @npepinpe . My query is bit different, my bad. I may put in different way,
https://jfk-1.operate.camunda.io/{clusterId}/v1/variables/search
https://jfk-1.tasklist.camunda.io/{clusterId}/v1/tasks/search
- Above mentioned api will fetch from ES or Snapshot or Event Log
- I have 2 workflow, first one will take 20 days to complete, so when I am querying on 20th date, the above query records will fetch it from the ES or Snapshot or Event Log
- second workflow will take 60 days to get complete, so when I am querying on 50th date, the above query records will fetch it from the ES or Snapshot or Event Log
- Is snapshot created for the each request sending from the zeebe client ?