Illustration Image

Cassandra availability while index summaries redistribution being executed

I have my backend Flask server connected to Cassandra and I'm seeing Cassandra becomes unavailable for a short time every 1 hour. I'm using cassandra-driver==3.25.0.

2024-12-24T16:07:00.363156408Z Traceback (most recent call last):
2024-12-24T16:07:00.363163598Z   File "cassandra/cluster.py", line 3522, in cassandra.cluster.ControlConnection._reconnect_internal
2024-12-24T16:07:00.363166032Z   File "cassandra/cluster.py", line 3544, in cassandra.cluster.ControlConnection._try_connect
2024-12-24T16:07:00.363168189Z   File "cassandra/cluster.py", line 1620, in cassandra.cluster.Cluster.connection_factory
2024-12-24T16:07:00.363170583Z   File "cassandra/connection.py", line 831, in cassandra.connection.Connection.factory
2024-12-24T16:07:00.363176028Z   File "/usr/local/lib/python3.7/site-packages/cassandra/io/libevreactor.py", line 267, in __init__
2024-12-24T16:07:00.363178247Z     self._connect_socket()
2024-12-24T16:07:00.363180375Z   File "cassandra/connection.py", line 898, in cassandra.connection.Connection._connect_socket
2024-12-24T16:07:00.363182758Z ConnectionRefusedError: [Errno 111] Tried connecting to [('172.18.0.5', 9042)]. Last error: Connection refused

I did a bit of research and found out that Cassandra internally perform index summaries distribution periodically (once every 60 minutes by default).

2024-12-25T16:10:46.731537895Z INFO  [IndexSummaryManager:1] 2024-12-26 01:10:46,730 IndexSummaryRedistribution.java:77 - Redistributing index summaries
2024-12-25T17:10:46.744763561Z INFO  [IndexSummaryManager:1] 2024-12-26 02:10:46,743 IndexSummaryRedistribution.java:77 - Redistributing index summaries
2024-12-25T18:10:46.752774412Z INFO  [IndexSummaryManager:1] 2024-12-26 03:10:46,751 IndexSummaryRedistribution.java:77 - Redistributing index summaries

I have only a single cluster deployed for Cassandra so I'm wondering if this is the reason the above behavior is happenning because there is no node availble to handle the queries while doing the redistribution thing.

Hopefully someone can shed a light on this for me. Thank you.

Become part of our
growing community!
Welcome to Planet Cassandra, a community for Apache Cassandra®! We're a passionate and dedicated group of users, developers, and enthusiasts who are working together to make Cassandra the best it can be. Whether you're just getting started with Cassandra or you're an experienced user, there's a place for you in our community.
A dinosaur
Planet Cassandra is a service for the Apache Cassandra® user community to share with each other. From tutorials and guides, to discussions and updates, we're here to help you get the most out of Cassandra. Connect with us and become part of our growing community today.
© 2009-2023 The Apache Software Foundation under the terms of the Apache License 2.0. Apache, the Apache feather logo, Apache Cassandra, Cassandra, and the Cassandra logo, are either registered trademarks or trademarks of The Apache Software Foundation. Sponsored by Anant Corporation and Datastax, and Developed by Anant Corporation.

Get Involved with Planet Cassandra!

We believe that the power of the Planet Cassandra community lies in the contributions of its members. Do you have content, articles, videos, or use cases you want to share with the world?