amazon web services - AWS architecture when multi-regions -
i've been introduced aws , loved it. however, i'm asking myself questions (that may stupid) architecturing multi-regions.
let's application used europeans , asians. first idea add ec2 instances in europe, s3 bucket hold static data , sqs queue , elasticache in europe. it's going blazingly fast european people, slower asians.
to solve this, i'd add cloudfront static data, images served asians too. however, requests server (ajax requests...) still going have latencies, solution add ec2 instance in singapore/tokyo region too.
however, new problem arise: if request dispatched tokyo ec2 instance, if needs receive message sqs stored in europe or access elasticache data => latency again + costs inter-regions transfer. need add sqs , elasticache in asia ?
maybe miss something, , cross-regions aws requests super-fast, i've understood, if want fast experience multi-regions, need duplicate services every regions (excepting s3 maybe, can use cloudfront that, , suppose can live latency if sqs job in asia need access s3 resource in europe).
anyway, did understand correctly ? have resources how architecture applications target multi-regions ?
thanks :)
these aren't stupid questions @ all! part absolutely correct:
maybe miss something, , cross-regions aws requests super-fast, i've understood, if want fast experience multi-regions, need duplicate services every regions cross-region requests limited speed of light , network topology between regions. expect requests asia reach european application in 1/4 second round trip. requests faster, can't guarantee of them faster, have design accordingly. if isn't fast enough, yes, you'll need deploy closer region , route users appropriate region. number of times round trip required application's architecture. if have many requests elasticache or sqs, 1/4 seconds add quickly. if can batch requests, might tolerable.
to route users appropriate region, you'll want @ route 53, part of aws family. this announcement route 53 describes latency-based routing between regions need. once users routed appropriate ec2 instances, each region you've deployed should isolated. configure european deployment ec2, sqs, elasticache, , other aws offerings served european region (eu-west-1). asian deployment, might host in ap-southeast-1 region. once route 53 connects asian user ec2 instance within ap-southeast-1, requests sqs, elasticache, etc. within same region , fast.
Comments
Post a Comment