is an attempt to build a cheap backend architecture as part of my small start up. I might have missed important things. So, please point it out, I will be happy to learn something new today
✅ Low Cost ❌ Redundancy High Web Servers API Servers Database Push Server Simple Notification Service APNS CERTS GCM Server API Key IAM ROLE https://api.pushservice.com /push? data=something &target=TargetARN https://api.pushservice.com /push? data=something &target=TargetARN
✅ Low Cost ❌❌❌❌❌ Redundancy High Web Servers API Servers Database Push Servers AZ1 - AZ2 Elastic Load Balancer Simple Notification Service APNS CERTS GCM Server API Key IAM ROLE https://api.pushservice.com /push? data=something &target=TargetARN https://api.pushservice.com /push? data=something &target=TargetARN
from anywhere possible, in short wherever there is a business process. • I want to treat single push notification as a piece of work, Which needs to get processed by a computer, either EC2 or may be a Lambda function. • I want to asynchronously process all the errors coming back from APNS and GCM and deal with them individually when I have resource in idle mode. • I want to scale to the edge of the universe ! • I want it dirt cheap!
PUT/ LIST/DELETE requests per second • Amazon S3 scales to support very high request rates. If your request rate grows steadily, Amazon S3 automatically partitions your buckets as needed to support higher request rates.
whopping 100*(24*60*60) = 8,640,000 pushes per day! Our aim is to test sending, 12*(24*60*60) = 1,036,800 pushes per day! We wanted to support only a million per month. above is just for test.
without losing single push, or receiving redundant pushes. • It costed us about $0.04 USD • Based on AWS calculator, if we send a million push with S3 and Lambda architecture it will cost us approx., • S3 = $6.44 USD • Lambda = $4.37 USD • So, with about $10.81 USD / Month you can send a million pushes. Add other $9.91 to support processing failed pushes etc.