AWS - Application Services
Simple Queue Service (SQS)
Amazon SQS is a web service that gives you access to a message queue that can be used to store messages while waiting for a computer to process them.Amazon SQS is a distributed queue service that enables web service applications to quickly and reliably queue messages that one component in the application generates and another consumes. A queue is a temporary repository for messages that are awaiting processing.
- Messages can contain up to 256KB of text in any format.
- Standard queues (default): Lets you have nearly unlimited number of transactions per second. Standard queues guarantee that a message is delivered at least once. However, occasionally (because of the highly distributed architecture that allows high throughput), more than once copy of a message might be delivered out of order. Standard queues provide best-effort ordering which ensures that messages are generally delivered in the same order as they are sent.
- FIFO queues.
- SQS is pull-based (not push based).
- Messages are 256KB in size.
- Messages can be kept in the queue from 1 minute to 14 days. The default is 4 days.
- Visibility Time Out is the amount of time that the message is invisible in the SQS queue after a reader picks up the message. Provided the message is processed before the visibility time out expires, the message will be deleted from the queue. If the message is not processed within that time, the message will become visible again and another read will process it. This could result in the same message being delivered twice.
- Visibility time out maximum is 12 hours.
- SQS guarantees that your messages will be processed at least once.
- Amazon SQS long polling is a way to retrieve messages from your Amazon SQS queues. Long polling doesn't return a response until a message arrives in the message queue, or the long poll times out.
AWS SWF (Simple Workflow Service)
Amazon SWF is a web service that makes it easy to coordinate across distributed application components. Amazon SWF enables applications for a range of use cases, including media processing, web application back-ends, business process workflows, and analytic pipelines, to be designed as a coordination of tasks. Tasks represent invocations of various processing steps in an application which can be performed by executable code, web service calls, human actions, and scripts.- SWF can retain a workflow for up to one year.
- SWF presents a task oriented API, whereas SQS offers a message oriented API.
- SWF ensures that a task is assigned only once and is never duplicated.
- SWF keeps track of all the tasks and events in an application.
SWF Actors
- Workflow starters: An application that can initiate a workflow. Could be your e-commerce website when placing an order or a mobile app searching for bus times.
- Deciders - Control the flow of activity tasks in a workflow execution . If something has finished in a workflow (or fails) a Decider decides what to do next.
- Activity Workers - Carry out the activity tasks.
AWS SNS (Simple Notification Service)
Amazon SNS is a web service that makes it easy to setup, operate, and send notifications from the cloud. It provides developers with a highly scalable, flexible and cost-effective capability to publish messages from an application and immediately deliver them to the subscriber or other applications.Besides pushing cloud notifications directly to mobile devices, Amazon SNS can also deliver notifications by SMS text message or email, to Amazon SQS queues, or to any HTTP endpoint. When a message is published to a SNS topic that has a Lambda function subscribed to it, the Lambda function is invoked with the payload of the published message.
SNS allows you to group multiple recipients using topics. A topic is an "access point" for allowing recipients to dynamically subscribe for identical copies of the same notification. One topic can support deliveries to multiple endpoint types -- for example, you can group together iOS, Android and SMS recipients. When you publish once to a topic, SNS delivers appropriately formatted copies of your message to each subscriber.
To prevent messages fro being lost, all messages published to Amazon SNS are stored redundantly across multiple availability zones.
Elastic Transcoder
Is a media transoder in the cloud. Convert media files from their original source format into different formats that will play on different devices. Provides transcoding presets for popular output formats, which means that you don't need to guess about which settings work best on particular devices.Pay based on minutes that you transcode and the resolution at which you transcode.
API Gateway
Amazon API Gateway is a fully managed service that makes it easy for developers to publish, maintain and secure APIs at any scale. With a few clicks in the AWS Management Console, you can create an API that acts as a "front door" for applications to access data, business logic, or functionality from your back-end services, such as applications running on Amazon Elastic Compute Cloud (EC2), code running on AWS Lambda, or any web application.- API Gateway is low cost and scales automatically.
- You can throttle API Gateway to prevent attacks.
- You can can log results to CloudWatch.
- If you are using Javascript/AJAX that uses multiple domains with API Gateway, ensure that you have CORS (Cross Origin Resource Sharing) enabled on API Gateway.
API Caching
You can enable API caching in Amazon API Gateway to cache your endpoint's response. With caching you can reduce the number of calls made to your endpoints also improve the latency of the requests to your API. When you enable caching for a stage, API Gateway caches responses from your endpoint for a specified time-to-live (TTL) period, in seconds. API Gateway then responds to the request by looking up the endpoint response from the cache instead of making a request to your endpoint.Kinesis
- Kinesis Streams
- Consists of shards (retention from 24 hours to 7 days)
- 5 transactions per second for reads, up to a maximum total data read rate of 2MB per second and up to 1000 records per second for writes, up to a maximum total data write rate of 1MB per second (including partition keys).
- Kinesis Firehose: You don't need to write consumers, Firehose is automated and will send you data to S3. When the data lands on Firehose it can be analyzed using Lambda and you don't have to worry about shards.
- Kinesis Analytics: Is a way to analyze data inside Kinesis using SQL-like queries and can be used across Streams and Firehose.
Comentarios
Publicar un comentario