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

Update README.md #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ ok
```
---------

##Scenarios and Corresponding Configuration Examples
## Scenarios and Corresponding Configuration Examples

####EXAMPLE 1:
#### EXAMPLE 1:
* Add counter regulated queue called ___heavy_crunches___ to limit your cpu intensive code executions to no more than 7 at a time

Configuration:
Expand All @@ -250,7 +250,7 @@ jobs:run( heavy_crunches,fun()->my_cpu_intensive_calculation() end)

```

####EXAMPLE 2:
#### EXAMPLE 2:
* Add rate regulated queue called ___http_requests___ to ensure that your http server gets no more than 1000 requests per second.
* Additionally, set the queue size to 10,000 (i.e. to control queue memory consumption)

Expand Down Expand Up @@ -278,7 +278,7 @@ jobs:run(http_requests,fun()->handle_http_request() end)

NOTE: with the config above, once 10,000 requests accumulates in the queue any incoming requests are dropped on the floor.

####EXAMPLE 3:
#### EXAMPLE 3:
* HTTP requests will always have a reasonable execution time. No point in keeping them in the queue past the timeout.

* Let's create ___patient_user_requests___ queue that will keep requests in the queue for up to 10 seconds
Expand Down Expand Up @@ -310,7 +310,7 @@ we're likely to maximize the happy users!

NOTE: In order to pace requests from both queues at 1000 per second, use __group_rate__ regulation (EXAMPLE 4)

####EXAMPLE 4:
#### EXAMPLE 4:
* Rate regulate http requests from multiple queues

Create __group_rates__ regulator called ___http_request_rate___ and assign it to both _impatient_user_requests_ and _patient_user_requests_
Expand Down Expand Up @@ -338,7 +338,7 @@ Create __group_rates__ regulator called ___http_request_rate___ and assign it t

```

####EXAMPLE 5:
#### EXAMPLE 5:
* Can't afford to drop http requests on the floor once max_size is reached?
* Implement and use your own queue to persist those unfortunate http requests and serve them eventually

Expand Down Expand Up @@ -378,11 +378,11 @@ Configuration:

```

###The use of sampler framework
### The use of sampler framework
1. Get a sampler running and sending feedback to the jobs server.
2. Apply its feedback to a regulator limit.

####EXAMPLE 6:
#### EXAMPLE 6:
* Adjust rate regulator limit on the fly based on the feedback from __jobs_sampler_cpu__ named ___cpu_feedback___

```erlang
Expand Down