[{"data":1,"prerenderedAt":374},["ShallowReactive",2],{"practiceExams":3,"studies":184,"free-lesson-\u002Fcourses\u002Faws-certified-solutions-architect-professional\u002Flessons\u002Famazon-elasticache-cache-consistency-with-a-backing-database-sap-c03":185},[4,22,36,48,60,72,84,97,109,120,130,141,154,163,175],{"id":5,"slug":6,"description":7,"questionCount":8,"isActive":9,"datePublicModified":10,"difficulty":11,"examVersion":18},22,"aws-certified-solutions-architect-professional-sap-c03","Prepare for the AWS Certified Solutions Architect - Professional (SAP-C03) exam with realistic practice questions on architecture, security, cost, resilience and automation, with detailed explanations.",767,true,"2026-11-15T00:00:00.000Z",{"providerId":12,"title":13,"subtitle":14,"slug":15,"coverImageUrl":16,"level":17},1,"AWS Certified Solutions Architect - Professional","SAP-C02","aws-certified-solutions-architect-professional","\u002Fimages\u002Fdifficulties\u002Faws-certified-solutions-architect-professionalsap-c02\u002Fcovers\u002Faws-SAP-C02.png","advanced",{"slug":6,"code":19,"dateBetaStart":20,"dateReleased":21,"pageSlug":15},"SAP-C03",null,"2026-11-17",{"id":23,"slug":24,"description":25,"questionCount":26,"isActive":9,"datePublicModified":27,"difficulty":28,"examVersion":34},5,"aws-certified-cloud-practitioner-clf-c02","Master your AWS Certified Cloud Practitioner exam with our Practice Exam Simulator. Prepare effectively and assess your readiness with realistic practice exams designed to mirror the most popular official AWS exam.",937,"2026-10-30T00:00:00.000Z",{"providerId":12,"title":29,"subtitle":30,"slug":31,"coverImageUrl":32,"level":33},"AWS Certified Cloud Practitioner","CLF-C02","aws-certified-cloud-practitioner","\u002Fimages\u002Fdifficulties\u002Faws-certified-cloud-practitionerclf-c02\u002Fcovers\u002Faws-CLF-C02.png","foundational",{"slug":24,"code":30,"dateBetaStart":20,"dateReleased":35,"pageSlug":31},"2023-09-19",{"id":37,"slug":38,"description":39,"questionCount":40,"isActive":9,"datePublicModified":27,"difficulty":41,"examVersion":46},8,"aws-certified-devops-engineer-professional-dop-c02","Boost your readiness for the AWS Certified DevOps Engineer - Professional (DOP-C02) exam with our practice exam simulator. Featuring realistic questions and detailed explanations, it helps you identify knowledge gaps and improve your skills.",1040,{"providerId":12,"title":42,"subtitle":43,"slug":44,"coverImageUrl":45,"level":17},"AWS Certified DevOps Engineer - Professional","DOP-C02","aws-certified-devops-engineer-professional","",{"slug":38,"code":43,"dateBetaStart":20,"dateReleased":47,"pageSlug":44},"2023-03-07",{"id":49,"slug":50,"description":51,"questionCount":52,"isActive":9,"datePublicModified":27,"difficulty":53,"examVersion":57},11,"aws-certified-ai-practitioner-aif-c01","Prepare for the AWS Certified AI Practitioner exam with our practice exam simulator. Realistic questions on AI, machine learning and generative AI fundamentals, with detailed explanations, help you find your knowledge gaps and assess your readiness.",928,{"providerId":12,"title":54,"subtitle":55,"slug":56,"coverImageUrl":45,"level":33},"AWS Certified AI Practitioner","AIF-C01","aws-certified-ai-practitioner",{"slug":50,"code":55,"dateBetaStart":58,"dateReleased":59,"pageSlug":56},"2024-08-13","2024-10-22",{"id":12,"slug":61,"description":62,"questionCount":63,"isActive":9,"datePublicModified":27,"difficulty":64,"examVersion":70},"aws-certified-solutions-architect-associate-saa-c03","Unlock your potential with the AWS Certified Solutions Architect - Associate Practice Exam Simulator. This comprehensive tool is designed to prepare you thoroughly and assess your readiness for the most sought-after AWS associate certification.",1203,{"providerId":12,"title":65,"subtitle":66,"slug":67,"coverImageUrl":68,"level":69},"AWS Certified Solutions Architect - Associate","SAA-C03","aws-certified-solutions-architect-associate","\u002Fimages\u002Fdifficulties\u002Faws-certified-solutions-architect-associatesaa-c03\u002Fcovers\u002Faws-SAA-C03.png","associate",{"slug":61,"code":66,"dateBetaStart":20,"dateReleased":71,"pageSlug":67},"2022-08-30",{"id":73,"slug":74,"description":75,"questionCount":76,"isActive":9,"datePublicModified":27,"difficulty":77,"examVersion":81},9,"aws-certified-data-engineer-associate-dea-c01","Prepare for your AWS Certified Data Engineer - Associate exam with our practice exam simulator. Featuring real exam scenarios, detailed explanations, and instant feedback to boost your confidence and success rate.",891,{"providerId":12,"title":78,"subtitle":79,"slug":80,"coverImageUrl":45,"level":69},"AWS Certified Data Engineer - Associate","DEA-C01","aws-certified-data-engineer-associate",{"slug":74,"code":79,"dateBetaStart":82,"dateReleased":83,"pageSlug":80},"2023-11-27","2024-03-12",{"id":85,"slug":86,"description":87,"questionCount":88,"isActive":9,"datePublicModified":89,"difficulty":90,"examVersion":94},17,"aws-certified-generative-ai-developer-professional-aip-c01","Get ready for the AWS Certified Generative AI Developer - Professional exam with our practice exam simulator. Realistic scenario-based questions with detailed explanations help you assess your readiness to build generative AI solutions on AWS.",982,"2026-10-29T00:00:00.000Z",{"providerId":12,"title":91,"subtitle":92,"slug":93,"coverImageUrl":45,"level":17},"AWS Certified Generative AI Developer - Professional","AIP-C01","aws-certified-generative-ai-developer-professional",{"slug":86,"code":92,"dateBetaStart":95,"dateReleased":96,"pageSlug":93},"2025-11-28","2026-03-17",{"id":98,"slug":99,"description":100,"questionCount":101,"isActive":9,"datePublicModified":89,"difficulty":102,"examVersion":107},13,"aws-certified-security-specialty-scs-c03","Advance your career in cloud security with the AWS Certified Security - Specialty (SCS-C03) Exam Simulator. Realistic, scenario-based practice exams mirror the official exam, with detailed explanations to close your knowledge gaps.",864,{"providerId":12,"title":103,"subtitle":104,"slug":105,"coverImageUrl":106,"level":17},"AWS Certified Security - Specialty","SCS-C03","aws-certified-security-specialty","\u002Fimages\u002Fdifficulties\u002Faws-certified-security-specialtyscs-c02\u002Fcovers\u002Faws_SCS_c02.png",{"slug":99,"code":104,"dateBetaStart":20,"dateReleased":108,"pageSlug":105},"2025-12-01",{"id":110,"slug":111,"description":112,"questionCount":113,"isActive":9,"datePublicModified":89,"difficulty":114,"examVersion":118},19,"aws-certified-machine-learning-engineer-associate-mla-c02","Prepare for the AWS Certified Machine Learning Engineer - Associate exam with our practice exam simulator. Realistic questions with detailed explanations help you find your knowledge gaps and assess your readiness to build and run ML workloads on AWS.",861,{"providerId":12,"title":115,"subtitle":116,"slug":117,"coverImageUrl":45,"level":69},"AWS Certified Machine Learning Engineer - Associate","MLA-C02","aws-certified-machine-learning-engineer-associate",{"slug":111,"code":116,"dateBetaStart":119,"dateReleased":20,"pageSlug":117},"2026-09-29",{"id":121,"slug":122,"description":123,"questionCount":124,"isActive":9,"datePublicModified":89,"difficulty":125,"examVersion":129},15,"aws-certified-ai-business-strategist-aib-c01","Prepare for the AWS Certified AI Business Strategist exam with our practice exam simulator. Realistic, scenario-based questions with detailed explanations help you assess your readiness to lead AI adoption on AWS and close your knowledge gaps.",848,{"providerId":12,"title":126,"subtitle":127,"slug":128,"coverImageUrl":45,"level":33},"AWS Certified AI Business Strategist","AIB-C01","aws-certified-ai-business-strategist",{"slug":122,"code":127,"dateBetaStart":119,"dateReleased":20,"pageSlug":128},{"id":131,"slug":132,"description":133,"questionCount":134,"isActive":9,"datePublicModified":89,"difficulty":135,"examVersion":139},21,"aws-certified-cloudops-engineer-associate-soa-c03","Prepare for the AWS Certified CloudOps Engineer - Associate exam with our practice exam simulator. Realistic questions with detailed explanations help you assess your readiness to deploy, operate and troubleshoot workloads on AWS.",862,{"providerId":12,"title":136,"subtitle":137,"slug":138,"coverImageUrl":45,"level":69},"AWS Certified CloudOps Engineer - Associate","SOA-C03","aws-certified-cloudops-engineer-associate",{"slug":132,"code":137,"dateBetaStart":20,"dateReleased":140,"pageSlug":138},"2025-09-30",{"id":142,"slug":143,"description":144,"questionCount":145,"isActive":9,"datePublicModified":146,"difficulty":147,"examVersion":151},10,"aws-certified-advanced-networking-specialty-ans-c01","The AWS Certified Advanced Networking - Specialty practice exam simulates the real test, offering scenario-based questions that assess your ability to design, implement, and troubleshoot complex AWS networking solutions. ",681,"2024-11-13T00:00:00.000Z",{"providerId":12,"title":148,"subtitle":149,"slug":150,"coverImageUrl":45,"level":17},"AWS Certified Advanced Networking - Specialty","ANS-C01","aws-certified-advanced-networking-specialty",{"slug":143,"code":149,"dateBetaStart":152,"dateReleased":153,"pageSlug":150},"2022-01-01","2022-07-12",{"id":155,"slug":156,"description":157,"questionCount":158,"isActive":9,"datePublicModified":159,"difficulty":160,"examVersion":161},6,"aws-certified-solutions-architect-professional-sap-c02","Elevate your career with the AWS Certified Solutions Architect - Professional Exam Simulator. Get ready to ace the most popular Professional AWS exam with our realistic practice exams. Assess your readiness, boost your confidence, and ensure your success.",789,"2024-06-06T00:00:00.000Z",{"providerId":12,"title":13,"subtitle":14,"slug":15,"coverImageUrl":16,"level":17},{"slug":156,"code":14,"dateBetaStart":20,"dateReleased":162,"pageSlug":20},"2022-11-15",{"id":164,"slug":165,"description":166,"questionCount":167,"isActive":9,"datePublicModified":159,"difficulty":168,"examVersion":173},4,"aws-certified-developer-associate-dva-c02","Unlock your potential as a software developer with the AWS Certified Developer - Associate Exam Simulator! Prepare thoroughly with realistic practice exams designed to mirror the official exam.",399,{"providerId":12,"title":169,"subtitle":170,"slug":171,"coverImageUrl":172,"level":69},"AWS Certified Developer - Associate","DVA-C02","aws-certified-developer-associate","\u002Fimages\u002Fdifficulties\u002Faws-certified-developer-associatedva-c02\u002Fcovers\u002Faws-DVA-C02.png",{"slug":165,"code":170,"dateBetaStart":20,"dateReleased":174,"pageSlug":171},"2023-02-28",{"id":176,"slug":177,"description":178,"questionCount":179,"isActive":9,"datePublicModified":159,"difficulty":180,"examVersion":181},7,"aws-certified-security-specialty-scs-c02","Advance your career in cloud cybersecurity with the AWS Certified Security - Specialty Exam Simulator! Tailored for professionals, this tool offers realistic practice exams to mirror the official exam.",5431,{"providerId":12,"title":103,"subtitle":104,"slug":105,"coverImageUrl":106,"level":17},{"slug":177,"code":182,"dateBetaStart":20,"dateReleased":183,"pageSlug":20},"SCS-C02","2023-07-11",[],{"slug":186,"title":187,"focus":188,"level":17,"components":189,"diagrams":212,"steps":235,"dateModified":369,"course":370,"nextLesson":371},"amazon-elasticache-cache-consistency-with-a-backing-database-sap-c03","Amazon ElastiCache: cache consistency with a backing database","How cache-aside and write-through patterns, invalidation, and TTLs control freshness when applications reuse cached database results.",[190,196,200,204,208],{"key":191,"kind":192,"name":193,"icon":194,"provider":195},"amazon-cloudfront","service","Amazon CloudFront","\u002Fimages\u002Fprovider-services\u002Famazon-cloudfront\u002Fcovers\u002FArch_Amazon-CloudFront_64.png","AWS",{"key":197,"kind":192,"name":198,"icon":199,"provider":195},"amazon-dynamodb","Amazon DynamoDB","\u002Fimages\u002Fprovider-services\u002Famazon-dynamodb\u002Fcovers\u002FArch_Amazon-DynamoDB_64.png",{"key":201,"kind":192,"name":202,"icon":203,"provider":195},"amazon-ec2","Amazon EC2","\u002Fimages\u002Fprovider-services\u002Famazon-ec2\u002Fcovers\u002FArch_Amazon-EC2_64.png",{"key":205,"kind":192,"name":206,"icon":207,"provider":195},"amazon-elasticache","Amazon ElastiCache","\u002Fimages\u002Fprovider-services\u002Famazon-elasticache\u002Fcovers\u002FArch_Amazon-ElastiCache_64.png",{"key":209,"kind":192,"name":210,"icon":211,"provider":195},"amazon-rds","Amazon RDS","\u002Fimages\u002Fprovider-services\u002Famazon-rds\u002Fcovers\u002FArch_Amazon-RDS_64.png",[213],{"key":214,"cards":215,"groups":225,"lines":226},"application-managed-cache",[216,219,222],{"key":217,"component":201,"label":218},"app","Application: owns cache policy",{"key":220,"component":205,"label":221},"cache","In-memory query-result cache",{"key":223,"component":209,"label":224},"database","Authoritative relational database",[],[227,229,231,233],{"from":217,"to":220,"label":228},"Cache commands",{"from":220,"to":217,"label":230},"Cache responses",{"from":217,"to":223,"label":232},"Database operations",{"from":223,"to":217,"label":234},"Database responses",[236,267,281,306,322,325,343,346,356],{"kind":237,"title":238,"body":239,"diagram":214,"walkthrough":240},"explanation","Put the application in charge of freshness","\u003Cp>\u003Cstrong>Query caching\u003C\u002Fstrong> reuses database results rather than executing the same query on every read. It suits frequently accessed, relatively static data, especially expensive non-indexed lookups, aggregations, and joins. Under high read concurrency, reuse reduces database CPU pressure and improves throughput.\u003C\u002Fp>\u003Cp>The trade-off is \u003Cstrong>potentially stale data\u003C\u002Fstrong>: a stored result does not prove that the database still contains the same values. Decide whether the application can tolerate that difference before deciding how to cache.\u003C\u002Fp>\u003Cp>This design uses an application on Amazon EC2, an \u003Cstrong>ElastiCache in-memory result cache\u003C\u002Fstrong>, and an authoritative relational database on Amazon RDS. These roles differ from Amazon CloudFront's HTTP content delivery and Amazon DynamoDB's nonrelational database role.\u003C\u002Fp>",[241,244,249,254,259,264],{"text":242,"cards":243},"The application owns the policy for reusing database results and deciding when to fetch them again.",[217],{"text":245,"cards":246,"lines":247},"The application sends cache commands to ElastiCache: look up a result, store a result, or invalidate an entry.",[220],[248],{"from":217,"to":220},{"text":250,"cards":251,"lines":252},"ElastiCache returns cache responses to the application. A lookup can return a stored result or report a miss.",[],[253],{"from":220,"to":217},{"text":255,"cards":256,"lines":257},"The application sends database queries and writes directly to the authoritative relational database on RDS.",[223],[258],{"from":217,"to":223},{"text":260,"cards":261,"lines":262},"The database returns query results and write outcomes to the application.",[],[263],{"from":223,"to":217},{"text":265,"cards":266},"The application connects the two stores through its cache policy; no direct cache-to-database connection synchronizes them.",[],{"kind":268,"title":269,"exercise":270},"exercise","Restore the two storage roles",{"type":271,"diagram":214,"question":272,"hidden":273,"tray":274},"palette","Fill the two storage slots: one holds reusable in-memory query results, and the other is the authoritative relational database.",[220,223],[275,276,277,279],{"component":205},{"component":209},{"component":191,"reason":278},"CloudFront delivers HTTP content; it is neither the application's in-memory database-result cache nor its authoritative relational database.",{"component":197,"reason":280},"DynamoDB is a nonrelational database, not the ElastiCache in-memory result cache or the relational backing database shown here.",{"kind":237,"title":282,"body":283,"table":284},"Separate read-time filling from write-time maintenance","\u003Cp>With \u003Cstrong>cache-aside\u003C\u002Fstrong>, also called lazy loading, the application first looks for the query result in the cache. A hit returns that result. On a miss, the application executes the database query, populates the cache with its result, and then returns the result. Repeated hits avoid re-executing the query; a miss still pays the database-query cost.\u003C\u002Fp>\u003Cp>With application-managed \u003Cstrong>write-through\u003C\u002Fstrong>, the application maintains the cached value when it writes the corresponding database data, rather than waiting for a later read to populate it. This adds cache work to the write path and can populate entries that are never read. It keeps the cache current for writes that successfully maintain both copies.\u003C\u002Fp>\u003Cp>These patterns address different moments and can be combined: \u003Cstrong>cache-aside handles misses\u003C\u002Fstrong>, while \u003Cstrong>write-through maintains values on writes\u003C\u002Fstrong>. Write-through is not a reason to assume that every cache lookup is a hit or that every database change passed through the cache-maintenance code.\u003C\u002Fp>",{"columns":285,"rows":289},[286,287,288],"Mechanic","Cache-aside","Write-through",[290,294,298,302],[291,292,293],"Population trigger","Read misses","Application writes",[295,296,297],"Work added","Miss read path","Write path",[299,300,301],"Population trade-off","First read pays","Unread entries possible",[303,304,305],"Freshness limitation","Hits can be stale","Only maintained changes",{"kind":268,"title":307,"exercise":308},"Identify what triggers cache maintenance",{"type":309,"question":310,"groups":311,"statements":312},"versus","Sort each statement by the mechanism that triggers the cache population it describes.",[287,288],[313,316,318,320],{"text":314,"group":315},"A read miss triggers a database query and a cache fill.",0,{"text":317,"group":315},"Population is deferred until a read needs a result that is absent from the cache.",{"text":319,"group":12},"Writing the underlying data triggers maintenance of its cached value.",{"text":321,"group":12},"A data write populates a cached value even if no subsequent read uses it.",{"kind":237,"title":323,"body":324},"Use invalidation and TTL for different freshness jobs","\u003Cp>\u003Cstrong>Invalidation\u003C\u002Fstrong> removes a cached result that should no longer be reused. Instead of replacing a result during a write, the application can invalidate it after changing the backing data; the next read then follows the cache-aside miss path. For a cached join or aggregation, consider every cached result affected by the changed data, not just an individual row's entry.\u003C\u002Fp>\u003Cp>A \u003Cstrong>time to live (TTL)\u003C\u002Fstrong> provides expiration even when an entry has not been explicitly invalidated. In this caching strategy, a read of an expired key is treated as a miss: the application queries the database and updates the cache. Expiration does not itself execute the database query.\u003C\u002Fp>\u003Cp>A TTL limits how long a stored result remains reusable without refresh, but \u003Cstrong>does not guarantee freshness before expiration\u003C\u002Fstrong>. A database change can make the cached value stale while its TTL is still valid. Write-through or invalidation handles known changes; TTL requires occasional database refreshes when entries continue to be requested.\u003C\u002Fp>",{"kind":268,"title":326,"exercise":327},"Follow one expired-key read",{"type":328,"diagram":214,"scenario":329,"path":330},"trace","Follow the application's cache-aside read when the requested query-result key has expired, through the command that refills the cache.",[331,333,335,337,339,341],{"card":217,"note":332},"Start the read by looking up the query-result key.",{"card":220,"note":334},"Treat the expired key as not found.",{"card":217,"note":336},"Receive the miss and execute the backing database query.",{"card":223,"note":338},"Execute the query and return its result.",{"card":217,"note":340},"Receive the database result and send a cache-fill command with a TTL.",{"card":220,"note":342},"Store the result for later reuse.",{"kind":237,"title":344,"body":345},"Keep freshness policy separate from consistency guarantees","\u003Cp>A complete reuse policy combines \u003Cstrong>cache-aside reads\u003C\u002Fstrong> with a decision about writes: maintain affected cached values through write-through, or invalidate affected results and let later reads refill them. Add \u003Cstrong>TTLs\u003C\u002Fstrong> so requested entries are periodically refreshed even when explicit maintenance has not kept them current.\u003C\u002Fp>\u003Cp>None of these choices makes a cache hit proof of the database's current state. \u003Cstrong>Query caching is not recommended for queries requiring strong consistency\u003C\u002Fstrong>, or for queries inside multi-statement transactions that require read-after-write consistency. A short TTL does not remove that restriction.\u003C\u002Fp>\u003Cp>Use this architecture for repeated, expensive reads whose consumers tolerate potential staleness. The application's separate request-and-response connections to the cache and database support the read, write-maintenance, and refresh paths; there is no direct connection that automatically synchronizes the two stores.\u003C\u002Fp>",{"kind":268,"title":347,"exercise":348},"Rebuild the application-managed caching path",{"type":349,"diagram":214,"question":350,"decoys":351},"build","Rebuild the request-and-response architecture for stale-tolerant query reuse, supporting cache-aside misses, write-through or invalidation, and TTL-driven refresh.",[352,354],{"component":191,"reason":353},"CloudFront delivers HTTP content; it does not fill the application's ElastiCache in-memory database-result-cache role.",{"component":197,"reason":355},"DynamoDB is nonrelational; it does not fill this design's authoritative relational-database role.",{"kind":237,"title":357,"body":358,"takeaways":359},"What to remember","\u003Cp>Reuse cached database results only within the application's \u003Cstrong>staleness tolerance\u003C\u002Fstrong>, with explicit policies for filling, maintaining, and expiring them.\u003C\u002Fp>",[360,363,366],{"title":361,"text":362},"Reuse has a boundary","Frequently repeated, expensive queries over relatively static data benefit from caching. Query caching is not recommended for strong-consistency requirements or multi-statement transactional queries requiring read-after-write consistency.",{"title":364,"text":365},"Maintain results deliberately","Cache-aside fills results after misses. Write-through maintains values during writes; invalidation removes affected results so later reads refill them.",{"title":367,"text":368},"TTL is not currentness","Reading an expired key causes a miss, database query, and cache refresh in this strategy. A value can still be stale before its TTL expires.","2026-11-16T05:42:15.333Z",{"pageSlug":15,"code":19,"certification":13,"certificationSlug":15},{"slug":372,"title":373},"amazon-elasticache-resilience-of-externalized-application-state-sap-c03","Amazon ElastiCache: resilience of externalized application state",1796130187858]