Skip to content

test: load testing tooling and initial observations - #225

Merged
beeme1mr merged 11 commits into
open-feature:mainfrom
Kavindu-Dodan:feat/load-test-init
Dec 13, 2022
Merged

beeme1mr merged 11 commits into
open-feature:mainfrom
Kavindu-Dodan:feat/load-test-init

Conversation

@Kavindu-Dodan

@Kavindu-Dodan Kavindu-Dodan commented Nov 25, 2022 •

Copy link
Copy Markdown
Contributor

This PR

PR introduce tools to support performance testing for flagd. Content include,

  • A random feature flag generator
  • Sample K6 script
  • go pprof enabled flagd build with a dedicated Dockerfile (profile.Dockerfile)
  • Initial performance observations

Related Issues

PR is related to #212

How to test

Consider the readme contents at /test/loadtest/README.MD

Signed-off-by: Kavindu Dodanduwa <[email protected]>
Signed-off-by: Kavindu Dodanduwa <[email protected]>
Comment thread loadtest/ff_gen.go Resolved

@beeme1mr beeme1mr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How was the loadTestResults.png created?

Signed-off-by: Kavindu Dodanduwa <[email protected]>
@Kavindu-Dodan

Copy link
Copy Markdown
Contributor Author

How was the loadTestResults.png created?

This is an extraction from the load test results [1]. If you are interested in how numbers were derived, it was by running a containerised flagd with random FFs (generated with ff_gen.go) and using the K6 script (included in the PR). Final result is the average of 3 test runs. And there was a warm-up time provided to flagd.

[1] https://docs.google.com/spreadsheets/d/1YLtkA-WryJXaZ4GWrbKhT_Izx3dh4spS/edit?usp=sharing&ouid=109303231969053490300&rtpof=true&sd=true

@beeme1mr
beeme1mr self-requested a review November 28, 2022 15:53
@toddbaert

toddbaert commented Nov 28, 2022 •

Copy link
Copy Markdown
Member

I think you should note somewhere that HTTP is used as the interface. Based on what I'm seeing, I think encoding and (de)serialization is probably where we are spending a lot of time. I think it would be ideal to run a suite in gRPC as well, using https://github.com/grpc/grpc/blob/master/doc/command_line_tool.md or https://github.com/fullstorydev/grpcurl, potentially. If we do this we'll want to make sure the same connection is used for all the RPCs. Do you think we should create an issue for this? Should we do it as part of this issue?

cc @beeme1mr

@beeme1mr

Copy link
Copy Markdown
Member

It would be worth extending the tests to also include gRPC. It looks like K6 supports it natively.

@Kavindu-Dodan

Kavindu-Dodan commented Nov 28, 2022 •

Copy link
Copy Markdown
Contributor Author

I think you should note somewhere that HTTP is used as the interface. Based on what I'm seeing, I think encoding and (de)serialization is probably where we are spending a lot of time. I think it would be ideal to run a suite in gRPC as well, using https://github.com/grpc/grpc/blob/master/doc/command_line_tool.md or https://github.com/fullstorydev/grpcurl, potentially. If we do this we'll want to make sure the same connection is used for all the RPCs. Do you think we should create an issue for this? Should we do it as part of this issue?

cc @beeme1mr

Great input. I highlighted the API type used in the observations section (updated with latest commit).

Yes, testing and comparing against gRPC would be great. And yes, pprof proved the same point: most of the cpu time and memory is spent on reading and writing request

Comment thread Dockerfile Resolved
Comment thread loadtest/README.MD Resolved
Comment thread loadtest/README.MD Resolved
Comment thread loadtest/README.MD Resolved
Kavindu-Dodan and others added 2 commits November 29, 2022 08:05
Co-authored-by: Skye Gill <[email protected]>
Signed-off-by: Kavindu Dodanduwa <[email protected]>
@beeme1mr

beeme1mr commented Dec 1, 2022

Copy link
Copy Markdown
Member

@Kavindu-Dodan please resolve any conversations that have been addressed.

@beeme1mr beeme1mr changed the title feat: load testing tooling and initial observations test: load testing tooling and initial observations Dec 1, 2022
@Kavindu-Dodan

Copy link
Copy Markdown
Contributor Author

@Kavindu-Dodan please resolve any conversations that have been addressed.

ACK. There's one more conversation to resolve and I am waiting for the response from @AlexsJones .

@AlexsJones

Copy link
Copy Markdown
Member

@Kavindu-Dodan please resolve any conversations that have been addressed.

ACK. There's one more conversation to resolve and I am waiting for the response from @AlexsJones .

Sorry just remarked on it

@Kavindu-Dodan

Copy link
Copy Markdown
Contributor Author

@Kavindu-Dodan please resolve any conversations that have been addressed.

ACK. There's one more conversation to resolve and I am waiting for the response from @AlexsJones .

Sorry just remarked on it

Thanks and I updated the PR with the suggested change

Comment thread profiler.go Resolved
@beeme1mr
beeme1mr merged commit 26de63e into open-feature:main Dec 13, 2022
@Kavindu-Dodan
Kavindu-Dodan deleted the feat/load-test-init branch December 13, 2022 17:52
beeme1mr pushed a commit that referenced this pull request Feb 7, 2023
@Kavindu-Dodan has contributed multiple significant changes and
proposals to flagd:

- multiple refactors: #291,
#307
- ci/security improvements:
#338,
#337
- architectural proposals (some of which got some attention from outside
parties!): open-feature/ofep#45,
open-feature/flagd-schemas#78,
#249 (comment)
- load testing: #225
- documentation improvements

For these reasons, I believe he should be made a CODEOWNER in this
repository.

NOTE: before this is merged, @Kavindu-Dodan should be added with at
least `maintainer` permissions to the repo.

Signed-off-by: Todd Baert <[email protected]>
raphael-wigoutschnigg-dt pushed a commit to open-feature-forking/flagd that referenced this pull request Mar 11, 2025
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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 this pull request may close these issues.

7 participants