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

Blockscout Simple Load testing #3088

Closed
3 tasks done
diminator opened this issue Mar 11, 2020 · 4 comments
Closed
3 tasks done

Blockscout Simple Load testing #3088

diminator opened this issue Mar 11, 2020 · 4 comments

Comments

@diminator
Copy link
Contributor

diminator commented Mar 11, 2020

  • load test GraphQL API with >= 50 connections
  • test complex GraphQL queries that could brake the instance
  • load test the web frontend
@aaitor
Copy link
Contributor

aaitor commented Apr 2, 2020

After some analysis of the integration of Absinthe into Blockscout, some details:

  • Blockscout includes an initial integration of max_complexity filter of Absinthe
    https://hexdocs.pm/absinthe/complexity-analysis.html

  • It uses a max_complexity of 200 that can be found in lib/block_scout_web/router.ex

  • The filter by complexity needs to be integrated in each Graphql query, currently is only included in:

    • Gets addresses by address hash.
    • Gets token transfers by token contract address hash

My suggestion on that would be:

  • Identify potential Graphql queries to protect
  • Implement & test the max_complexity filter in each of those
  • Evaluate if we need different thresholds per query or the general threshold of 200 is good enough

@aaitor
Copy link
Contributor

aaitor commented Apr 3, 2020

Blockscout PR: celo-org/blockscout#93

@aaitor
Copy link
Contributor

aaitor commented Apr 7, 2020

Graphql api test scenario:

  • Running in a server with 8GB RAM and 1vCPU
  • Using alfajores data
  • 50 virtual users * 22 minutes
All virtual users finished
Summary report @ 14:24:00(+0200) 2020-04-07
  Scenarios launched:  500
  Scenarios completed: 500
  Requests completed:  111500
  Mean response/sec: 82.3
  Response time (msec):
    min: 51.9
    max: 45484.1
    median: 3452.7
    p95: 19940.1
    p99: 32707.5
  Scenario counts:
    GraphQL Query load test: 500 (100%)
  Codes:
    200: 111500

Done in 1356.75s.

Running that scenario we didn't find any error code

@aaitor
Copy link
Contributor

aaitor commented Apr 14, 2020

Load tested the UI using JMeter with 25 concurrent users. No errors found.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants