MemberJanuary 25, 2024 at 6:41 pm
Hi, regarding the question:
A multinational consumer goods company runs its website entirely on its on-premises data center with high-resolution photos and videos. Due to the unprecedented growth of their popular product, they are expecting an increase in incoming traffic to their website across the globe in the coming days ahead. The CTO requested to urgently do the necessary architectural changes to be able to handle the demand. The solutions architect suggested migrating the application to AWS but the CTO decided that they need at least 3 months to implement a hybrid cloud architecture.
What could the solutions architect do with the current on-premises website to help offload some of the traffic and scale out to meet the demand in a cost-effective way?
My suggested answer was:
Use an S3 bucket to host all the static files of the website and create a CloudFront web distribution for serving the dynamic files. Set up Origin Shield and launch a CloudFront Function to offload the DNS to AWS to handle CloudFront traffic.
I recognized the static content (photos, videos) mentioned in the Scenario
and assumed, that moving it to S3 and servicing from there – would offload traffic.
The Dojo answer says about A:
But isnt that, what exactly will minimize traffic and take the load off the instances?
In other scenarios – its exactly what Dojo suggest – move static stuff out to S3.
AdministratorJanuary 26, 2024 at 7:51 pm
Thank you for seeking clarification regarding this question.
The following options both use CloudFront:
“Use an S3 bucket to host all the static files of the website and create a CloudFront web distribution for serving the dynamic files. Set up Origin Shield and launch a CloudFront Function to offload the DNS to AWS to handle CloudFront traffic.” (incorrect)
“Launch a CloudFront web distribution with the URL of the on-premises web application as the origin. Offload the DNS to AWS to handle CloudFront traffic.” (correct answer)
The key difference is that the former uses S3 as the origin of the files, whereas the latter uses the on-premises server as the origin. Please note that we are looking for a solution to implement a ‘hybrid cloud architecture’ in the scenario. Migrating the data to S3 would imply adopting a full cloud architecture. This would violate the condition in the scenario, hence why it’s incorrect. As for the correct answer, the on-premises server is still involved in the architecture and using it as the origin of the CloudFront Distribution, thus meeting the requirement.
Furthermore, the part, “launch a CloudFront Function to offload the DNS to AWS to handle CloudFront Traffic”, is wrong because the CloudFront function is not capable of DNS offloading, which is typically handled by DNS management services like Route 53.
I understand that it’s not clearly explained why using S3 is considered wrong. We’ll make sure to include what we discuss here in the rationale.
Neil @ Tutorials Dojo
MemberJanuary 26, 2024 at 9:25 pm
The idea to move static content (photos and videos explicitely mentioned in the scenario)
would take the load off the on-prem servers, which would be left with serving only dynamic data.
and result in a hybrid setup, as the dynamic part of the application would still be on prem.
The DNS offloading via CloudFront.functions – is a good point of yours.
It would not be straight forward to implement it.
AdministratorJanuary 29, 2024 at 7:39 pm
Thank you for pointing that out. That is a valid point. However, even if that were the case, moving the static content to S3 making it the host, then, creating dynamic content using CloudFront web distribution would not be very cost-effective compared to the right answer. Remember that, the question is asking the most cost-effective way among the choices, and while CloudFront can indeed handle dynamic content to some extent, its primary strength lies in efficiently delivering static assets, as outlined in the provided explanation. Additionally, the scenario did not mention moving the static contents elsewhere but rather focused on offloading some of the traffic from the on-premises server. By placing a CDN (CloudFront) in front of the on-prem server, you would effectively reduce the server’s load, even without migrating the files to S3.
I hope this answers your query. Rest assured, we’ll incorporate our discussion into the rationale accordingly. Thank you for your valuable input.
Neil @ Tutorials Dojo
Log in to reply.