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

Feature: Add min/max scale for auto-scaling - Swarm & external providers #419

Merged
merged 4 commits into from Dec 5, 2017

Conversation

alexellis
Copy link
Member

Signed-off-by: Alex Ellis alexellis2@gmail.com

Description

Feature: Add min/max scale for auto-scaling - Swarm & external providers

Motivation and Context

  • I have raised an issue to propose this change (required)

See: #414

How Has This Been Tested?

With new tests and with Stefan via gateway and kubernetes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
@ericstoekl
Copy link
Contributor

Tried this out and at least can see that min is working, as the number of replicas for my function starts at 5. What's the recommended way to make the container scale up until it hits its max limit? Would using ab work?

@alexellis
Copy link
Member Author

Yes that will work too with a high number or a bash loop. Doesn't need to be high figures for concurrency and you can monitor the alerts in Prometheus too

@ericstoekl
Copy link
Contributor

ericstoekl commented Dec 4, 2017

Gotcha, I will try that out.

Confirmed that max works as well as min in Docker Swarm.

I will try this out on Kubernetes next.

Edit -- tried this out in faas-netes. Looks like it creates the specified number of replicas, and in faas-cli ls the number is shown correctly, but in kubectl get pods it shows a separate pod for each replica. Is this expected?

Replica list on Faas-Netes

@stefanprodan
Copy link
Contributor

stefanprodan commented Dec 4, 2017

@ericstoekl this is how Kubernetes works, replicas refer to pods not containers

@alexellis
Copy link
Member Author

@ericstoekl do this instead - kubectl get deploy that is where the replica count is stored.

@ericstoekl
Copy link
Contributor

In that case, I see that the function has the correct number of replicas. Thanks 💯

@alexellis
Copy link
Member Author

Thank you both for testing. I'll merge.

@alexellis alexellis merged commit 6304409 into master Dec 5, 2017
@alexellis alexellis deleted the scale_with_min_values branch October 8, 2019 16:33
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

3 participants