the following DSP services: ◦ Mapping service ◦ Albums service ◦ Snafus service ◦ Revenue service • Supposed to have replication but unreliable in the version we use ◦ Version 2.0.0 for Albums (built specifically for Tango, and later in data app) ◦ Version 1.7.7 for everything else • Low maintenance
• Port 2424 (binary connection) • Port 2480 (HTTP connection) • S3 Backup • Log file • Disk, Host, Memory Backup is created every 15 minutes (based on LVM snapshot), uploads to S3, and is downloaded to standby every 5 minutes.
as distributed cache (esp due to support of locks and distributed id generator) • Supports queue and topic so you can publish and subscribe, and even register events • Used by most DSP applications and services to store session data • Low maintenance
search support (otherwise we’d build many secondary indices in Cassandra) • To avoid concurrent reindexing, one of the many Albums instances acquires a lock, performs the reindex, and cache index result in the cache.
Advanced Message Queuing Protocol (AMQP) - default, most popular standard • Simple/Streaming Text Oriented Message Protocol (STOMP) - text-based • Message Queue Telemetry Transport (MQTT) - compacted, pub/sub protocol without actually having a queue. https://www.rabbitmq.com/protocols.html
a queue Consumer connects to RabbitMQ and fetch message from a queue. Like a named mailbox, holds messages. Note: You can have multiple procducers and consumers. It makes sense right?
the consumer, otherwise, RabbitMQ will re-queue the message. • By default messages in a queue are delivered to each connected consumer in round-robin manner. One consumer gets one message at a time.
Exchange receives messages from producers. • Based on routing algorithm (topic, fanout, or direct), route messages to one or more queues matching the routing policy (or none if no match).
delivered to all queues attached to the exchange. • Use case: A new EC2 instance is discovered, the message contains some information about this instance (id, IP address, SSH key name, etc). Action: 1. Log this discovery, 2. Analyze audit log 3. Adds to our dynamic monitoring system 4. Run some assurance tests on this instance.
you want the same message delivered to multiple queues based on a pattern-matching routing key. • If message is sent with routing key “log.critical”, the message is delivered to both QA and Q2.
node, even in cluster setup. a. Node is down for maintenance, queues and messages won’t be available b. Node is terminated, queues and messages are lost To remediate this issue, use mirrored queue. The downside is performance hit. Messaging queuing and dequeuing happens with the “master” node where the queue was first declared and created.
be same (/var/lib/rabbitmq/.erlang.cookie) as the first node • Joining a cluster means the new candidate will be reset (config and data). • Erlang version must be homogeneous otherwise node cannot join the cluster. • RabbitMQ minor version difference is OKAY (3.6.0 and 3.6.1, NOT 3.6.0 and 3.7.0)