Giter Club home page Giter Club logo

Comments (12)

sundy-li avatar sundy-li commented on July 19, 2024 1

There is a config named retryTimes. see https://github.com/housepower/clickhouse_sinker/blob/master/output/clickhouse.go#L133

from clickhouse_sinker.

ArtemChekunov avatar ArtemChekunov commented on July 19, 2024 1

@bun4uk
Well if you implement at-least-once delivery
them you can just reset an offset for your Kafka consumer group

  1. stop clickhouse_sinker
  2. reset the offset
  3. start clickhouse_sinker

or as an option, if you don't wanna stop the ingestion
and you need to re-fill the gap you many start another instance of clickhouse_sinker
with the same configuration but with another Kafka group-id and stop it later when the gap gonna will re-filled

from clickhouse_sinker.

sundy-li avatar sundy-li commented on July 19, 2024 1

I think this option is to manual. I'm looking for a way how to prevent such outages.
In my case, I have 4 ch nodes with 2 shards and 2 replicas. What do you think of the usage of haproxy for rebalancing insertion load?

You can set multiple hosts separated by a comma, such as host1,host2,host3 for rebalancing inserts.

Yes, a delay between retries can be a feature option, but ClickHouse has many more error codes, such as Table is in read only mode, Missing columns, Table does not exist. It's hard to catch all error expectations.

from clickhouse_sinker.

bun4uk avatar bun4uk commented on July 19, 2024

@sundy-li
Thanks! That's a good option.
But what if the Clickhouse server will be unreachable for several minutes and all retries will be run out?
Is there a way to prevent data loss in the database?

from clickhouse_sinker.

bun4uk avatar bun4uk commented on July 19, 2024

@ArtemChekunov thanks!
I think this option is to manual. I'm looking for a way how to prevent such outages.
In my case, I have 4 ch nodes with 2 shards and 2 replicas. What do you think of the usage of haproxy for rebalancing insertion load?

from clickhouse_sinker.

ArtemChekunov avatar ArtemChekunov commented on July 19, 2024

@bun4uk
you may look at chproxy

from clickhouse_sinker.

bun4uk avatar bun4uk commented on July 19, 2024

@ArtemChekunov will check. Thanks

from clickhouse_sinker.

bun4uk avatar bun4uk commented on July 19, 2024

@ArtemChekunov
Wait, chproxy works over HTTP and Clickhouse-sinker works over TCP.

from clickhouse_sinker.

ArtemChekunov avatar ArtemChekunov commented on July 19, 2024

Hmm indeed

from clickhouse_sinker.

bun4uk avatar bun4uk commented on July 19, 2024

@sundy-li is there any param to set a delay between reties?

from clickhouse_sinker.

bun4uk avatar bun4uk commented on July 19, 2024

@sundy-li
Am I right understood? In case of insertion error, clickhouse-sinker would initiate retry and it will choose some random host from the host-list?

from clickhouse_sinker.

sundy-li avatar sundy-li commented on July 19, 2024

@sundy-li
Am I right understood? In case of insertion error, clickhouse-sinker would initiate retry and it will choose some random host from the host-list?

Yes

from clickhouse_sinker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.