Optimized for: Gemini / ChatGPT / Claude
Advanced AI Prompt for Lambda HTTP Client Keep-Alive Tuning
Use this engineered prompt to drastically optimize your workflow and output.
Required Variables
- ✦
[HTTP_CLIENT_LIBRARY] - ✦
[AVERAGE_REQUESTS_PER_CONTAINER] - ✦
[CONNECTION_ESTABLISHMENT_TIME]
lambda-http-keep-alive-tuning.txt
Configure the [HTTP_CLIENT_LIBRARY] to use TCP Keep-Alive and connection pooling within a Lambda execution environment. Explain the benefits of reusing connections across multiple invocations in the same container to reduce [CONNECTION_ESTABLISHMENT_TIME]. Provide specific code for the AWS SDK (v2 and v3) or common libraries like Axios/Requests to ensure sockets are not closed prematurely, thus saving billed execution time.
Example Output
"The AI would provide a specific Node.js configuration for 'https.Agent' with 'keepAlive: true' and explain how this saves 20-50ms per request."