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

init scale test framework #413

Merged
merged 4 commits into from
Sep 23, 2022
Merged

Conversation

allenlsy
Copy link
Contributor

@allenlsy allenlsy commented Sep 23, 2022

This PR is a starting point of scalability test.

It creates necessary functions to perform a simple test. It tests scaling up to 16 active gameservers from 1, 4, 16 standby servers respectively.

Uses openarena as testing game server to test scalability

  • add functions scale_up and scale_clear to allocate new standing by servers. These method can also be used without scale-test.sh .
  • add test cases regarding number of standby max servers

After running scale-test.sh, here is the result:

test 1: scale up to 16 servers from 1 standby server
Scale up time: 13s

test 2: scale up to 16 servers from 4 standby server
Scale up time: 34s

test 1: scale up to 16 servers from 16 standby server
Scale up time: 13s

Signed-off-by: Allen Leigh allenlsy@gmail.com

Uses openarena as testing game server to test scalability

* add functions to allocate new server from standby state and clear all
  active servers
* add test cases regarding number of standby servers

Signed-off-by: Allen Leigh <allenlsy@gmail.com>
@dgkanatsios
Copy link
Collaborator

LGTM! YAML files reference the same GameServerBuild, right? Any way we can use one of them and then do kubectl scale gameserverbuild <name> --replicas X to do scaling?

Signed-off-by: Allen Leigh <allenlsy@gmail.com>
@@ -2,21 +2,21 @@

source ./util.sh

GSID=85ffe8da-c82f-4035-86c5-9d2b5f42d6f7
GSB_NAME=gameserverbuild-sample-openarena

echo "test 1: scale up to 16 servers from 1 standby server"
kubectl apply -f ./standby/1.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

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

these kubectl apply commands are not valid anymore, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It creates the gsb with 1 initial standby and 16 max. I think we still need it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

oh, sorry, files were not visible and I thought they were deleted. Do we need all three of them now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we need, but it shouldn't be different initial standby. We actually need to test the scale time for different max.

Copy link
Collaborator

Choose a reason for hiding this comment

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

max in all three files is currently the same, 16. Plus, we can send a JSON patch via kubectl and change it dynamically if needed. Not a big deal TBH, I wouldn't block this PR for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated test cases to use max as the variant.


echo "test 1: scale up to 16 servers from 1 standby server"
kubectl apply -f ./standby/1.yaml
scale_up $GSID 16
scale_up $GSB_NAME 16
kubectl delete gsb gameserverbuild-sample-openarena
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need to delete the build before scaling? we can downscale to zero if needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can scale down to 0. Which one is more appropriate here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

let's scale to zero, any chance we can wait till the actual standing by is zero?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

* scale down to 0 servers instead of deleting gsb

Signed-off-by: Allen Leigh <allenlsy@gmail.com>
Copy link
Collaborator

@dgkanatsios dgkanatsios left a comment

Choose a reason for hiding this comment

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

LGTM! Wanna take and slightly modify your PR description and put it in a README? After this we can merge

@allenlsy
Copy link
Contributor Author

LGTM! Wanna take and slightly modify your PR description and put it in a README? After this we can merge

Can you help update the PR description? I will add instructions to the readme, or a separate readme in this folder.

@dgkanatsios
Copy link
Collaborator

apologies, I wasn't clear. You don't have to modify the PR description itself, just whatever you copy and paste into the README. Hope it makes sense now!

Signed-off-by: Allen Leigh <allenlsy@gmail.com>
@dgkanatsios dgkanatsios merged commit c010704 into PlayFab:main Sep 23, 2022
@allenlsy allenlsy deleted the init-scale-test branch September 24, 2022 00:14
@dgkanatsios dgkanatsios mentioned this pull request Sep 24, 2022
4 tasks
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.

None yet

2 participants