Skip to content

Commit a861249

Browse files
committed
docs: Update readme with auto-scaling
1 parent 790cf25 commit a861249

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

src/docs/README.adoc

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ without operational burden or harming the clusters performance
139139
** Efficient individual message acknowledgement system (without local or third system state) to massively reduce message replay upon failure
140140
* Per `key` concurrent processing, per partition and unordered message processing
141141
* Offsets committed correctly, in order, of only processed messages, regardless of concurrency level or retries
142+
* <<Automatic concurrency scaling,auto-scaling>> (self scaling thread pool)
142143
* Vert.x non-blocking library integration (HTTP currently)
143144
* Fair partition traversal
144145
* Zero~ dependencies (`Slf4j` and `Lombok`) for the core module
@@ -324,8 +325,9 @@ NOTE: Because the library coordinates offsets, `enable.auto.commit` must be disa
324325

325326
After this setup, one then has the choice of interfaces:
326327

327-
* `ParallelStreamProcessor`
328-
* `VertxParallelStreamProcessor`
328+
* `ParallelStreamProcessor` - <<core>>
329+
* `AutoScalingProcessor` - <<auto-scaling>>
330+
* `VertxParallelStreamProcessor` - <<http-with-vertx>>
329331
* `JStreamParallelStreamProcessor`
330332
* `JStreamVertxParallelStreamProcessor`
331333

@@ -337,6 +339,7 @@ See {issues_link}/12[issue #12], and the `ParallelConsumer` JavaDoc:
337339
include::{project_root}/parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelConsumer.java[tag=javadoc]
338340
----
339341

342+
[[core]]
340343
=== Core
341344

342345
==== Simple Message Process
@@ -368,6 +371,27 @@ You have the option to either use callbacks to be notified of events, or use the
368371

369372
In future versions, we plan to look at supporting other streaming systems like https://github.com/ReactiveX/RxJava[RxJava] via modules.
370373

374+
[[auto-scaling]]
375+
=== Automatic Concurrency Scaling (self configuring)
376+
377+
`AutoScalingProcessor`
378+
379+
Prevents the user from having to choose a level of concurrency with either the core engine or the vertx engine.
380+
Selecting the correct concurrency level in a system can be extremely complicated.
381+
Especially as the system evolves, or the systems integrated with change.
382+
By implementing a self tuning system, this burden is removed, and the system itself continuously tunes itself to adapt to the conditions it's running in.
383+
384+
Netflix's https://medium.com/@NetflixTechBlog/performance-under-load-3e6fa9a60581[blog post] on their project has a great explanation of the concepts.
385+
To summarises, the system executes on a special thread pool, which measures the time taken for the jobs to run.
386+
The thread pool is then gradually expanded, until it measures that the time taken to execute a job starts to degrade, or the job actually fails.
387+
At which point it contracts the thread-pool, and continues measuring.
388+
389+
WARNING:: This approach may cause more duplicates in integrated systems when jobs timeout. If minimising failure or duplication is a concern, either stick to <<core>> or use a https://github.com/Netflix/concurrency-limits/tree/18692b09e55a0574bea94d92e95a03c3e89012d2/concurrency-limits-core/src/main/java/com/netflix/concurrency/limits/limit[limit] that has a https://github.com/Netflix/concurrency-limits/blob/18692b09e55a0574bea94d92e95a03c3e89012d2/concurrency-limits-core/src/main/java/com/netflix/concurrency/limits/limit/Gradient2Limit.java#L114[maximum setting] available.
390+
391+
This uses concepts from https://en.wikipedia.org/wiki/TCP_congestion_control#Congestion_window[TCP congestion control] to set the thread pool size by measuring performance of execution.
392+
This was originally planned to be done from near scratch, using concepts from https://en.wikipedia.org/wiki/Control_theory#PID_feedback_control[Engineering Control Theory], but Netflix has developed a library for the exact same thing with it's https://github.com/Netflix/concurrency-limits[concurrency-limits library], which uses very similar theory from http://intronetworks.cs.luc.edu/1/html/newtcps.html#tcp-vegas[TCP congestion] http://pages.cs.wisc.edu/~akella/CS740/F08/740-Papers/BOP94.pdf[control theory].
393+
394+
371395
[[http-with-vertx]]
372396
=== HTTP with the Vert.x Module
373397

0 commit comments

Comments
 (0)