Cloud Integration
Cloud Integration
When we start deploying multiple applications, they will inevitably need to communicate with one another.
Two types of communication mechanism are:
Issues with Synchronous application:
- Sudden traffic spike
- suddenly need to encode 1000 videos when usually it was only 10.
Solution:
- To have a decoupled for of application.
- SQS: queue model
- SNS: pub/sub model
- Kinesis: real-time data streaming model
- These services can scale independently from our applications.
Amazon SQS:
- oldest AWS offerings over 10 years old.
- Fully managed service (~serverless), use to decouple applications.
- Scales from 1 message per second to 10,000s per second.
- Default retention of messages: 4 days, maximum of 14 days
- No limit to how many messages can be in the queue
- Messages are deleted after they're read by consumers
- Low latency (<10 ms on publish and receive)
- Consumers share the work to read messages & scale horizontally
Amazon Kinesis Data Streams
- Kinesis - real-time big data streaming
- Managed service to collect, process and analyze real-time streaming data at any scale
- Amazon Kinesis Data Streaming - low latency streaming to ingest data at scale from hundreds of thousands of sources.
- Amazon Data Firehose - load Kinesis Data Streams into Amazon S3, Redshift, OpenSearch, etc...
Amazon SNS
- The "event publishers" only sends message to one SNS topic
- As many "event subscribers" as we want to listen to the SNS topic notifications
- Each subscriber to the topic will get all the messages
- Up to 12,500,000 subscriptions per topic, 100,000 topics limit
Amazon MQ
- SQS, SNS are "cloud native" services: proprietary protocols from AWS
- Traditional applications running from on-premises may use open protocols such as: MQTT, AMQP, STOMP, Openwire, WSS
- When migrating to the cloud, instead of re-engineering the application to use SQS and SNS, we can use Amazon MQ
- Amazon MQ is a managed message broker service for
- Rabbit MQ
- Active MQ
- Amazon MQ does'nt scale as much as SQS/SNS
- Amazon MQ runs on servers, can run in Mutli-AZ with failover
- Amazon MQ has both queue featur (~SQS) and topic features (~SNS)
Summary:
- SQS:
- Queue service in AWS
- Multiple Producers, messages are kept up to 14 days
- Multiple Consumers share the read and delete messages when done
- Used to decouple applications in AWS
- SNS:
- Notification service in AWS
- Subscribers: Email, Lambda, SQS, HTTP, Mobile...
- Multiple Subscribers, send all messages to all of them
- No message retention
- Kinesis: real-time data streaming, persistence and analysis
- Amazon MQ: managed message broker for ActiveMQ and RabbitMQ in the cloud (MQTT, AMQP.. protocols)







Comments
Post a Comment