Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Queue Based Architectures

Queue Based Architectures

Modern applications are no longer a single server doing single requests. Today applications need to collaborate with multiple internal and external systems. Your application might need some information from a third party service or start a process in an internal one.

Despite the difficulty of creating and orchestrating distributed systems, the application as a whole needs to be reliable and scalable.

In this talk I'd like to present the benefits (and pitfalls) of queue based architectures, and how they can help build (most) modern applications.

Avatar for Nicolás Hock Isaza

Nicolás Hock Isaza

October 16, 2015
Tweet

More Decks by Nicolás Hock Isaza

Other Decks in Programming

Transcript

  1. Modern Applications • Collaborate with other internal or external systems.

    • Creating and orchestrating services is hard. It requires maintainence. • Application must be reliable, robust and easy to scale. Queue Based Architectures - @nhocki
  2. What is QBA? (Queue Based Architectures) A way of designing

    systems where the communitation between them is made with a reliable queue . Queue Based Architectures - @nhocki
  3. When is a good idea? • No need for real

    time (sub-second) responses. • Remove tasks from the request cycle. • Slow tasks or batched processes. Queue Based Architectures - @nhocki
  4. Rabbit MQ ! (that's not the logo, but it's cute)

    Queue Based Architectures - @nhocki
  5. Exchanges Where messages are sent. Route messages to one or

    more queues. Queue Based Architectures - @nhocki
  6. Queues Store messages for them to be consumed. If there

    are multiple consumers, round- robin is used. Queue Based Architectures - @nhocki
  7. Bindings Ties between exchanges and queues. Define the routing rules

    for messages. Queue Based Architectures - @nhocki
  8. Fanout: 1 — to —> ALL Sends the message to

    all queues. Queue Based Architectures - @nhocki
  9. Fanout: 1 — to —> ALL Sends the message to

    all queues. Queue Based Architectures - @nhocki
  10. Direct: 1 — to —> N Simple filter on routing

    key. Queue Based Architectures - @nhocki
  11. Direct: 1 — to —> N Simple filter on routing

    key. Queue Based Architectures - @nhocki
  12. Topic: 1 — to —> N Advanced filters for routing

    messages. Queue Based Architectures - @nhocki
  13. Topic: 1 — to —> N Advanced filters for routing

    messages. Queue Based Architectures - @nhocki
  14. Dashboard (Twitter) • Way more reads than writes. • What

    about duplicated tweets? (retweets) • What happens when there's a conversation going? Querying for my dashboard gets harder & more complex. Queue Based Architectures - @nhocki