Home › Forums › General Discussions › Portal Issues and Improvements › Cost effectiveness context › Reply To: Cost effectiveness context
-
Hello Kumar,
Thank you for your comment! When evaluating the best solution, you’re right in considering design-time and runtime factors. In this case, the key challenge in the question revolves around handling significant traffic spikes efficiently during peak shopping seasons while maintaining optimal performance and cost-efficiency.
The option says, “Create separate ECS services for browsing and checkout modules, each with its own auto-scaling configuration. Use CloudFront Functions to inspect JWT, route requests to the appropriate ECS service based on the requested module, user access level, and load.” is the most appropriate solution here because it focuses on runtime scalability by separating the browsing and checkout modules into independent ECS services, each with its own auto-scaling configuration. This allows the platform to handle varying loads for the browsing module, which experiences higher traffic while keeping the checkout module unaffected. Auto-scaling ECS services ensure that resources are allocated dynamically during high-traffic periods, optimizing performance without over-provisioning or under-provisioning.
While AWS Lambda is a cost-effective option for some workloads, especially for highly variable traffic or shorter processes, the architecture, in this case, likely involves more complex and sustained traffic for browsing and checkout modules, making ECS a better fit for managing these sustained loads. Additionally, refactoring to Lambda would require significant changes to the current architecture. It might not align well with the existing system’s design, leading to more complexity and potentially higher design-time costs.
Lastly, CloudFront Functions in the option effectively route requests based on user roles and access levels encoded in the JWT. This ensures that the browsing and checkout modules are intelligently handled, reducing unnecessary strain on either service, particularly the browsing module during high traffic.
So, the correct answer balances scalability, performance, and cost-efficiency during high-traffic periods, making it the best solution. We hope this explanation clarifies the reasoning behind the correct answer!
Feel free to reach out if you have any further questions.
Regards,
Nikee @ Tutorials Dojo