Skip to content
This repository has been archived by the owner. It is now read-only.

Block server start until Cassandra is initialized #98

Merged
merged 3 commits into from Aug 15, 2017
Merged

Conversation

@c-w
Copy link
Contributor

@c-w c-w commented Aug 15, 2017

The first request to Cassandra is very slow (on the order of 20 seconds
during my testing), I reckon because the connection and pool are being
built up. Subsequent requests are much faster (sub-second).

We don't want our users to have a problem with hitting the slow first
request, so we should warm up the Cassandra connection before we let the
server start. In this way, when we re-deploy the GraphQL server, we'll
simply continue running the instances of the old code in the load
balancer until the new server is fully operational and has warmed up the
Cassandra connection.

@c-w c-w requested review from Smarker and erikschlegel Aug 15, 2017
@c-w c-w force-pushed the server-start-blocker branch from e7af6e8 to 881249b Aug 15, 2017
Copy link
Contributor

@Smarker Smarker left a comment

LGTM

c-w added 3 commits Aug 15, 2017
The first request to Cassandra is very slow (on the order of 20 seconds
during my testing), I reckon because the connection and pool are being
built up. Subsequent requests are much faster (sub-second).

We don't want our users to have a problem with hitting the slow first
request, so we should warm up the Cassandra connection before we let the
server start. In this way, when we re-deploy the GraphQL server, we'll
simply continue running the instances of the old code in the load
balancer until the new server is fully operational and has warmed up the
Cassandra connection.
@c-w c-w force-pushed the server-start-blocker branch from 6be9184 to c595ac0 Aug 15, 2017
@c-w c-w merged commit fc08166 into master Aug 15, 2017
2 checks passed
@c-w c-w deleted the server-start-blocker branch Aug 15, 2017
@c-w c-w removed the in progress label Aug 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants