1、Delivering Duolingo Millions of messages within seconds Duolingo08/04/2024Presented by:Vitor Pellegrino,Zhen ZhouDuolingos mission is to develop the best education in the world and make it universally available.Our social presence26.9M123.4MPhilip Pacheco/Getty Images5 seconds4 million userswhat we
2、will coverGeneral ArchitectureDeep Dive:Superb OwlGeneral Architecture100s of microservices100s of microservices10s of millions of requests/min Technology stackTechnology stackAmazon RDSAmazon DynamoDBAmazon Elastic Container ServiceWhy ECS?Why not Kubernetes?Reduced complexity was very important in
3、 the beginningAWS native constructsSize of the platform teamCI/CDGalaxy Apps gRPC/OpenAPIShareable terraform modulesZombie modeZombie modeZombie modeJeevesJeevesJeevesJeevesJeevesJeevesZendesk(cs reports,twitter)AppFigures(reviews)Jira(str tickets)JeevesJeevesZendesk(cs reports,twitter)AppFigures(re
4、views)Jira(str tickets)Shake to reportJeevesJeevesZendesk(cs reports,twitter)AppFigures(reviews)Jira(str tickets)external formatinternal formats3ElasticSearchShake to reportFreeze GunTODO:Architecture diagramhttps:/ was fine for a whileIntroducing VBitor:The Marketing Manager Oh I forgot there is on
5、e last thingDeep Dive:Superb OwlWhere did the“impossible”task come from?To send 4M notifications in 5 secondsSpeed(How fast?)Scale(How big?)Timing(What time?)Operating principle:Embrace challenges!Challenge 1:SpeedChallenge 2:ScaleChallenge 3:TimingTechnical RequirementsHow do we send notifications
6、at the target rate?How do we get all the cloud resources we need in time?How do we ensure resiliency/idempotency?Our solution:Asynchronous!System DiagramUse case A:upload a campaign1.Engineer creates a campaign with a list of userID.2.Server acknowledges the request,then asynchronously starts fetchi