SysPadExamples › Multi-region social platform

Multi-region social platform

Active-active photo/social platform across two regions: geo-routed edge, full regional stacks, cross-region graph replication, and global tables for media index, sessions, recommendations, and moderation.

Production-scale multi-region design where both regions’ feed reads and uploads contend on shared GLOBAL resources - the bottleneck only emerges superposed.

Global DNS Route 53 Global CDN CloudFront AT LIMIT Edge WAF WAF Media Origin S3 Global Auth Cognito AT LIMIT Media Index DynamoDB Session Store DynamoDB AT LIMIT Recommendations DynamoDB Push Notifications SNS Activity Firehose Kinesis AT LIMIT Event Aggregator Lambda Analytics Warehouse Redshift AT LIMIT Moderation Model Lambda Moderation Log S3 US Load Balancer ALB US Feed API EKS AT LIMIT US Feed Cache ElastiCache US Social Graph Aurora US Timeline Store DynamoDB US Search OpenSearch AT LIMIT US Upload Queue SQS US Image Processor Lambda US Thumbnails S3 US Feed Fan-out Lambda US Moderation Queue SQS US Recommendations Lambda AT LIMIT US Notify Queue SQS EU Load Balancer ALB EU Feed API EKS AT LIMIT EU Feed Cache ElastiCache EU Social Graph Aurora AT LIMIT EU Timeline Store DynamoDB EU Search OpenSearch AT LIMIT EU Upload Queue SQS EU Image Processor Lambda EU Thumbnails S3 EU Feed Fan-out Lambda EU Moderation Queue SQS EU Recommendations Lambda AT LIMIT EU Notify Queue SQS

How it works

Media Index
DynamoDB global table. Both regions read and write it, so uploads worldwide contend here.
Session Store
Global session store. Every feed read in both regions hits it, so the two regions stack here.
Moderation Model
Shared moderation model. Upload pipelines from both regions queue into it.
US Social Graph
Primary writer for the social graph; replicates cross-region to the EU replica.
EU Social Graph
Cross-region read replica of the US primary; serves EU reads locally.

Request flows

US feed read

  1. Global DNS
  2. Edge WAF
  3. US Load Balancer
  4. US Feed API
  5. Session Store
  6. US Timeline Store
  7. US Feed Cache
  8. US Social Graph

EU feed read

  1. Global DNS
  2. Edge WAF
  3. EU Load Balancer
  4. EU Feed API
  5. Session Store
  6. EU Timeline Store
  7. EU Feed Cache
  8. EU Social Graph

US upload

  1. Global DNS
  2. Edge WAF
  3. US Load Balancer
  4. US Feed API
  5. US Upload Queue
  6. US Image Processor
  7. US Thumbnails
  8. Media Index
  9. US Moderation Queue
  10. Moderation Model

EU upload

  1. Global DNS
  2. Edge WAF
  3. EU Load Balancer
  4. EU Feed API
  5. EU Upload Queue
  6. EU Image Processor
  7. EU Thumbnails
  8. Media Index
  9. EU Moderation Queue
  10. Moderation Model

US new post fan-out

  1. Global DNS
  2. Edge WAF
  3. US Load Balancer
  4. US Feed API
  5. US Feed Fan-out
  6. US Timeline Store
  7. US Notify Queue
  8. Push Notifications

US search

  1. Global DNS
  2. Edge WAF
  3. US Load Balancer
  4. US Feed API
  5. US Search
  6. Media Index

Open this architecture in SysPad · All examples