-
Notifications
You must be signed in to change notification settings - Fork 241
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
Clean up code relating to decision_policy and forecast_policy. #3957
Open
EvanKrall
wants to merge
6
commits into
master
Choose a base branch
from
u/krall/PAASTA-18298_delete_forecast_policy_decision_policy
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3a37205
Remove unused forecasting.py and test_forecasting.py
EvanKrall e1f3c16
Remove unused autoscaling_component stuff, now that forecast_policy i…
EvanKrall 078beef
Remove references to forecast_policy from test_kubernetes_tools.py
EvanKrall 0d6fc13
Remove forecast_policy from autoscaling_schema. PAASTA-18298
EvanKrall f0277b5
Remove references to decision_policy: bespoke, and update some docs a…
EvanKrall 998333a
Merge branch 'master' of github.com:Yelp/paasta into u/krall/PAASTA-1…
EvanKrall File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -67,8 +67,11 @@ The currently available metrics providers are: | |||||
|
||||||
:uwsgi: | ||||||
With the ``uwsgi`` metrics provider, Paasta will configure your pods to be scraped from your uWSGI master via its `stats server <http://uwsgi-docs.readthedocs.io/en/latest/StatsServer.html>`_. | ||||||
Setpoint refers to the worker utilization, which is the percentage of workers that are busy. | ||||||
We currently only support uwsgi stats on port 8889, and Prometheus will attempt to scrape that port. | ||||||
|
||||||
You can specify ``moving_average_window_seconds`` (default ``1800``, or 30 minutes) to adjust how long of a time period your worker utilization is averaged over: set a smaller value to autoscale more quickly, or set a larger value to ignore spikes. | ||||||
|
||||||
.. note:: | ||||||
|
||||||
If you have configured your service to use a non-default stats port (8889), PaaSTA will not scale your service correctly! | ||||||
|
@@ -78,15 +81,21 @@ The currently available metrics providers are: | |||||
With the ``gunicorn`` metrics provider, Paasta will configure your pods to run an additional container with the `statsd_exporter <https://github.com/prometheus/statsd_exporter>`_ image. | ||||||
This sidecar will listen on port 9117 and receive stats from the gunicorn service. The ``statsd_exporter`` will translate the stats into Prometheus format, which Prometheus will scrape. | ||||||
|
||||||
You can specify ``moving_average_window_seconds`` (default ``1800``, or 30 minutes) to adjust how long of a time period your worker utilization is averaged over: set a smaller value to autoscale more quickly, or set a larger value to ignore spikes. | ||||||
|
||||||
:active-requests: | ||||||
With the ``active-requests`` metrics provider, Paasta will use Envoy metrics to scale your service based on the amount | ||||||
of incoming traffic. Note that, instead of using ``setpoint``, the active requests provider looks at the | ||||||
``desired_active_requests_per_replica`` field of the autoscaling configuration to determine how to scale. | ||||||
|
||||||
You can specify ``moving_average_window_seconds`` (default ``1800``, or 30 minutes) to adjust how long of a time period the number of active requests is averaged over: set a smaller value to autoscale more quickly, or set a larger value to ignore spikes. | ||||||
|
||||||
:piscina: | ||||||
This metrics provider is only valid for the Yelp-internal server-side-rendering (SSR) service. With the ``piscina`` | ||||||
metrics provider, Paasta will scale your SSR instance based on how many Piscina workers are busy. | ||||||
|
||||||
You can specify ``moving_average_window_seconds`` (default ``1800``, or 30 minutes) to adjust how long of a time period your worker utilization is averaged over: set a smaller value to autoscale more quickly, or set a larger value to ignore spikes. | ||||||
|
||||||
:arbitrary_promql: | ||||||
The ``arbitrary_promql`` metrics provider allows you to specify any Prometheus query you want using the `Prometheus | ||||||
query language (promql) <https://prometheus.io/docs/prometheus/latest/querying/basics/>`. The autoscaler will attempt | ||||||
|
@@ -99,25 +108,17 @@ The currently available metrics providers are: | |||||
Decision policies | ||||||
^^^^^^^^^^^^^^^^^ | ||||||
|
||||||
The currently available decicion policies are: | ||||||
|
||||||
:proportional: | ||||||
(This is the default policy.) | ||||||
Uses a simple proportional model to decide the correct number of instances | ||||||
to scale to, i.e. if load is 110% of the setpoint, scales up by 10%. | ||||||
|
||||||
Extra parameters: | ||||||
|
||||||
:moving_average_window_seconds: | ||||||
The number of seconds to load data points over in order to calculate the average. | ||||||
Defaults to 1800s (30m). | ||||||
Currently, this is only supported for ``metrics_provider: uwsgi``. | ||||||
|
||||||
:bespoke: | ||||||
Allows a service author to implement their own autoscaling. | ||||||
This policy results in no HPA being configured. | ||||||
An external process should periodically decide how many replicas this service needs to run, and use the Paasta API to tell Paasta to scale. | ||||||
See the :ref:`How to create a custom (bespoke) autoscaling method` section for details. | ||||||
This is most commonly used by the Kew autoscaler. | ||||||
|
||||||
:Anything other value: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
The default autoscaling method. | ||||||
Paasta will configure a Kubernetes HPA to scale the service based on the metrics providers and setpoints. | ||||||
|
||||||
|
||||||
Using multiple metrics providers | ||||||
-------------------------------- | ||||||
|
7 changes: 0 additions & 7 deletions
7
docs/source/generated/paasta_tools.autoscaling.forecasting.rst
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this meant to be
Any other value:
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes