A team has an application which is a website.
The team wants to test different versions of the website to the users without redirecting or changing the browser URL.
In order to perform this kind of A/B testing, the team does not plan to modify any front-end or back-end code with additional logic.
And it is supposed to put this logic to CDN network.
What is the best place/service to implement the switching logic?
Click on the arrows to vote for the correct answer
A. B. C. D.Correct Answer - B.
Lambda@Edge can help perform A/B testing without the need to redirect or change the browser URL.
For details, please refer to use cases of Lambda@Edge in.
https://aws.amazon.com/lambda/edge/.Option A is incorrect: Because this scenario needs to implement the logic in CDN network which should be in CloudFront.
Option B is CORRECT: Refer to the below explanation:-
Option C is incorrect: Global accelerator can provide high availability and superior performance however it cannot add logic with Lambda.
Option D is incorrect: Lambda@Edge should be chosen which is the service to add additional logic in order to perform A/B testing.
This option is not accurate compared with Option.
B.
The best place to implement the switching logic in a CDN network for A/B testing without modifying front-end or back-end code is Lambda@Edge.
Lambda@Edge is a serverless compute service offered by AWS that allows developers to run code in response to events that occur in Amazon CloudFront, AWS's content delivery network. This service provides a way to execute custom logic at the edge locations of the CDN.
To perform A/B testing, the team can write a Lambda function that chooses which version of the website to serve to the user based on a random or deterministic algorithm. The function can inspect request headers, cookies or query parameters to determine which version of the website to serve.
The team can also use Lambda@Edge to perform other types of content-based routing such as routing based on geolocation, time of day, or device type. Additionally, Lambda@Edge can be used to implement security, compliance, and governance policies such as filtering out malicious traffic or enforcing access control policies.
Weighted routing at Route53 is a DNS service that can be used to route traffic to different endpoints based on weights assigned to each endpoint. While it can be used to perform A/B testing, it requires modifying DNS settings, which may not be ideal for this use case.
Global accelerator at CloudFront is a service that provides static IP addresses that can be used to route traffic to AWS resources. While it can be used to perform A/B testing, it requires modifying the configuration of the resources being tested, which is not consistent with the requirement to avoid modifying front-end or back-end code.
Lambda and API Gateway is a service that allows developers to build APIs with Lambda functions as the backend. While it can be used to perform A/B testing, it requires modifying the backend code, which is not consistent with the requirement to avoid modifying front-end or back-end code.
Therefore, the best place/service to implement the switching logic for A/B testing without modifying front-end or back-end code with additional logic is Lambda@Edge.