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

Using deck with Cassandra datastore causes 409 errors #154

Closed
StuAtKong opened this issue May 21, 2020 · 3 comments · Fixed by #179
Closed

Using deck with Cassandra datastore causes 409 errors #154

StuAtKong opened this issue May 21, 2020 · 3 comments · Fixed by #179

Comments

@StuAtKong
Copy link

deck runs Admin API calls too fast for Cassandra to propagate changes to all nodes. This causes intermittent 409 errors when the Cassandra nodes do not have the data yet for subsequent API calls. Request to add a configurable delay to deck, similar to db_update_propagation, that will allow Cassandra to catchup

@dowster
Copy link

dowster commented May 21, 2020

We’ve also run into this issue and have mitigated it with the —parallelism 1 switch.

@cello86
Copy link

cello86 commented May 25, 2020

We already tested the parallelism to to 1 but with a big number of changes the 409 error appeared in a intermittent way.

@hbagdi
Copy link
Member

hbagdi commented May 27, 2020

Tracking the fix for this in #160 to fix this issue.
--parallelism 1 can solve the problem only if your C* cluster is properly tuned and has enough resources.

hbagdi added a commit that referenced this issue Jun 26, 2020
decK first creates all the services and then creates related routes.
With a distributed like Cassandra, route creation happens before
the DB rows for new services are propagated to other nodes in the
cassandra cluster. This results in a 409 from kong because kong ensures
that service specified in a route is actually present in the db (c* has
no notion of foreign relations, kong does a read on the service to
verify and enforce foreign key relations).

With the new configurable flag, users of cassandra can inject an
aritifical between insert operations of related entities to avoid failures
described above. The use of the flag is discouraged and is only
implemented to provide a stop-gap solution.

Fix #160
Fix #154
hbagdi added a commit that referenced this issue Jun 26, 2020
decK first creates all the services and then creates related routes.
With a distributed like Cassandra, route creation happens before
the DB rows for new services are propagated to other nodes in the
cassandra cluster. This results in a 409 from kong because kong ensures
that service specified in a route is actually present in the db (c* has
no notion of foreign relations, kong does a read on the service to
verify and enforce foreign key relations).

With the new configurable flag, users of cassandra can inject an
aritifical between insert operations of related entities to avoid failures
described above. The use of the flag is discouraged and is only
implemented to provide a stop-gap solution.

Fix #160
Fix #154
@hbagdi hbagdi closed this as completed in f352c78 Jun 26, 2020
hbagdi added a commit that referenced this issue Jun 26, 2020
decK first creates all the services and then creates related routes.
With a distributed like Cassandra, route creation happens before
the DB rows for new services are propagated to other nodes in the
cassandra cluster. This results in a 409 from kong because kong ensures
that service specified in a route is actually present in the db (c* has
no notion of foreign relations, kong does a read on the service to
verify and enforce foreign key relations).

With the new configurable flag, users of cassandra can inject an
aritifical between insert operations of related entities to avoid failures
described above. The use of the flag is discouraged and is only
implemented to provide a stop-gap solution.

Fix #160
Fix #154
From #179
rainest pushed a commit that referenced this issue Apr 21, 2021
decK first creates all the services and then creates related routes.
With a distributed like Cassandra, route creation happens before
the DB rows for new services are propagated to other nodes in the
cassandra cluster. This results in a 409 from kong because kong ensures
that service specified in a route is actually present in the db (c* has
no notion of foreign relations, kong does a read on the service to
verify and enforce foreign key relations).

With the new configurable flag, users of cassandra can inject an
aritifical between insert operations of related entities to avoid failures
described above. The use of the flag is discouraged and is only
implemented to provide a stop-gap solution.

Fix #160
Fix #154
rainest pushed a commit that referenced this issue Apr 21, 2021
decK first creates all the services and then creates related routes.
With a distributed like Cassandra, route creation happens before
the DB rows for new services are propagated to other nodes in the
cassandra cluster. This results in a 409 from kong because kong ensures
that service specified in a route is actually present in the db (c* has
no notion of foreign relations, kong does a read on the service to
verify and enforce foreign key relations).

With the new configurable flag, users of cassandra can inject an
aritifical between insert operations of related entities to avoid failures
described above. The use of the flag is discouraged and is only
implemented to provide a stop-gap solution.

Fix #160
Fix #154
From #179
AntoineJac pushed a commit that referenced this issue Jan 23, 2024
decK first creates all the services and then creates related routes.
With a distributed like Cassandra, route creation happens before
the DB rows for new services are propagated to other nodes in the
cassandra cluster. This results in a 409 from kong because kong ensures
that service specified in a route is actually present in the db (c* has
no notion of foreign relations, kong does a read on the service to
verify and enforce foreign key relations).

With the new configurable flag, users of cassandra can inject an
aritifical between insert operations of related entities to avoid failures
described above. The use of the flag is discouraged and is only
implemented to provide a stop-gap solution.

Fix #160
Fix #154
AntoineJac pushed a commit that referenced this issue Jan 23, 2024
decK first creates all the services and then creates related routes.
With a distributed like Cassandra, route creation happens before
the DB rows for new services are propagated to other nodes in the
cassandra cluster. This results in a 409 from kong because kong ensures
that service specified in a route is actually present in the db (c* has
no notion of foreign relations, kong does a read on the service to
verify and enforce foreign key relations).

With the new configurable flag, users of cassandra can inject an
aritifical between insert operations of related entities to avoid failures
described above. The use of the flag is discouraged and is only
implemented to provide a stop-gap solution.

Fix #160
Fix #154
From #179
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants