Skip to content
This repository has been archived by the owner on Mar 7, 2018. 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.

Copy link
Contributor

@Smarker Smarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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 merged commit fc08166 into master Aug 15, 2017
@c-w c-w deleted the server-start-blocker branch August 15, 2017 20:27
@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
Development

Successfully merging this pull request may close these issues.

None yet

2 participants