Skip to content

Instantly share code, notes, and snippets.

@razorcd
Last active November 22, 2020 21:33
Show Gist options
  • Save razorcd/f440ad549b55fab81a23646dfe6078e8 to your computer and use it in GitHub Desktop.
Save razorcd/f440ad549b55fab81a23646dfe6078e8 to your computer and use it in GitHub Desktop.
Scaling reactive APIs with Redis-Streams - www.razorcodes.com
                       +----------------------------+
                       | Kafka Topic A, Partition 1 +------.    +--------------+                     +-----------+
                       +----------------------------+       `-->+   Service    |                     |           |
                                                                |  Instance 1  +<---------------+    |           |         API HTTP request
                       +----------------------------+       ,-->+              |                |    |           +<----- Event stream listener
                       | Kafka Topic A, Partition 2 +------`    +--------------+                |    |    API    |            /customer1
                       +----------------------------+                                           +----+  Gateway  |
                                                                +--------------+                     |           |
                       +----------------------------+           |   Service    |DataUpdatedEvent     |           |
 Customer1 data ------>+ Kafka Topic A, Partition 3 +---------->+  Instance 2  |----------------+    |           |
DataUpdatedEvent       +----------------------------+           |              |                |    |           |
                                                                +--------------+                |    +-----------+
                                                                                                |
                                                                                                +--> No Event stream listener
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment