From a9f6797ec1874baff6d20502519a15af0f6a3593 Mon Sep 17 00:00:00 2001 From: Roman Bobrovskyi Date: Mon, 24 Feb 2025 10:46:10 +0100 Subject: [PATCH] chore: updated chart with dynamodm and removed response origin lambda --- README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f8d62ce..cb23b14 100644 --- a/README.md +++ b/README.md @@ -99,8 +99,8 @@ sequenceDiagram participant User participant CloudFront participant Request Origin Lambda@Edge - participant Response Origin Lambda@Edge participant S3Bucket + participant DynamoDB participant ElasticBeanstalk with Load Balancer %% Flows @@ -110,17 +110,15 @@ sequenceDiagram Request Origin Lambda@Edge ->> S3Bucket: Sends Head request to check if file exists in S3 alt File exists in S3 Request Origin Lambda@Edge ->> S3Bucket: Forwarding request to S3 origin - S3Bucket ->> Response Origin Lambda@Edge: lambda edge listener - Response Origin Lambda@Edge ->> CloudFront: returns result from s3 origin - alt File is expired in S3 - Response Origin Lambda@Edge ->> CloudFront: sets cache header to no-cache to avoid caching of stale data - else - Response Origin Lambda@Edge ->> CloudFront: forwards request from S3 origin - end + else File exists in S3 but is expired + Request Origin Lambda@Edge ->> ElasticBeanstalk with Load Balancer: Forwarding request to render server + ElasticBeanstalk with Load Balancer ->> S3Bucket: stores generated page + ElasticBeanstalk with Load Balancer ->> DynamoDB: updates page cache metadata else File does not exit Request Origin Lambda@Edge ->> ElasticBeanstalk with Load Balancer: Sends request to render page when it does not exist in S3 ElasticBeanstalk with Load Balancer ->> CloudFront: returns generated page ElasticBeanstalk with Load Balancer ->> S3Bucket: stores generated page + ElasticBeanstalk with Load Balancer ->> DynamoDB: stores page cache metadata end CloudFront ->> User: returns page result ```