Which design should be used to reduce comment latency and improve user experience?
Use edge-optimized API with Amazon CloudFront to cache API responses.
Modify the blog application code to request GET comment[commented] every 10 seconds.
Use AWS AppSync and leverage WebSockets to deliver comments.
Change the concurrency limit of the Lambda functions to lower the API response time.
Explanations:
Edge-optimized API with CloudFront can cache responses, but it is not suitable for real-time updates as it serves cached data, which may lead to delayed comment updates.
Polling the comments endpoint every 10 seconds could increase latency, strain the backend, and does not offer a real-time experience for users.
AWS AppSync with WebSockets provides real-time data updates, allowing new comments to be pushed instantly to users, enhancing engagement and providing a real-time experience.
Adjusting the concurrency limit of Lambda functions may improve response times for API requests but does not address the need for real-time updates for new comments.