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
siddhi how to confirm the data availability? #1450
Comments
Yes if you deploy Siddhi in default way you will lose the data. You can enable state persistence in two ways.
To persist data in a file system you have to do the following.
This will persist the state to your state.persistence:
enabled: true
intervalInMin: 1
revisionsToKeep: 3
persistenceStore: io.siddhi.distribution.core.persistence.DBPersistenceStore
config:
datasource: <DATASOURCE NAME> # A datasource with this name should be defined in wso2.datasources namespace
table: <TABLE NAME> Please refer to Siddhi documentation for more details. |
If I didn't want to use the docker or Kubernetes , How Can I Cover the |
@cristicmf, currently Siddhi distribution does not support that HA deployment without docker or K8s. But if you really need this HA feature you can try out the HA functionality in our stream processor. Please refer this link to get more idea about HA deployment in the stream processor. |
thx ~~ And I want know more thing about the scalability , can you give me some tips. |
In our stream processor, we are supporting the following deployment types.
Now we have separate runtime called Siddhi runner which is a very light environment to run streaming logic. All the deployment types now managed using docker and K8s. You can find out more details about docker deployments in Siddhi using following links. For K8s deployment, we have custom K8s operator called Siddhi operator. Up to now, Siddhi operator supports default distributed deployment. We are working on with the fully distributed deployment for K8s now. You can find out K8s deployment details from the following link. [3] https://github.com/siddhi-io/siddhi-operator Try this Katacoda samples about each deployment type in K8s. Also, refer to the Siddhi documentation for more descriptive details. |
i run siddhi as a java library,it seems all way mentioned above can not cover,is there any way to confirm ? HA mode need duplicate one instance, it's not a good way to solve my restart scenario!! |
@xywan89 you can achieve in-memory persistence and file store persistence using Siddhi Java library. Please refer following test cases to understand how to persist your state. |
tks,it seems java documentaion is insufficient, look forward to your complement。 what more about persistance? such as the difference between persistance and IncrementalPersistence ? |
the other issue is can i limit the resource used by siddhi runtime when i use siddhi as a java library,such as limit memory cost? |
Sorry for the late reply. In the state persistence, it simply persists the overall state of the current checkpoint of the application. For example, let say your application is in checkpoint For that kind of scenario, you can use incremental persistence. Incremental persistence uses incremental checkpointing. In there Siddhi will only persist the changes(or delta) instead of persisting overall state. |
Closing the issue since query is answered. Please reopen if u need further assistance on this. |
now i deploy a siddhi cluster on some docker,and will restart the cluster frequently(at least one or more per day).my question is when i restart an docker, if will loss data or not ?
if will loss data,how can i do to confirm the data availability?
The text was updated successfully, but these errors were encountered: