serverless-graphql-blog icon indicating copy to clipboard operation
serverless-graphql-blog copied to clipboard

How to make it scale?

Open fritzblue opened this issue 9 years ago • 4 comments

I've been extremely intrigued by the ideal of using Lambda + Dynamo for a GraphQL-powered backend. However, Dynamo's "scan" operation won't scale. What kind of steps could be taken to take this same model and make it more scalable at the DB layer?

fritzblue avatar Feb 20 '16 16:02 fritzblue

Many users of this project are likely to run into the same question so a bit more guidance from the app would be ideal. Until then, here is what AWS says on query/scan performance.

weitzman avatar Feb 25 '16 08:02 weitzman

A couple relevant links for pagination+graphql

  • https://github.com/dowjones/graphql-dynamodb-connections
  • https://facebook.github.io/relay/graphql/connections.htm

weitzman avatar Feb 25 '16 17:02 weitzman

@user453584 Why doesn't scan scale?

chadkouse avatar Feb 29 '16 02:02 chadkouse

@chadkouse From the docs:

A Scan operation always scans the entire table or secondary index, then filters out values to provide the desired result, essentially adding the extra step of removing data from the result set. Avoid using a Scan operation on a large table or index with a filter that removes many results, if possible. Also, as a table or index grows, the Scan operation slows.

jes-carr avatar May 11 '16 09:05 jes-carr