From 7dafbce22c39bb253f1f43f9989541f6112a71a4 Mon Sep 17 00:00:00 2001 From: Jeremy Daly Date: Sat, 14 Dec 2019 16:17:29 -0500 Subject: [PATCH] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e99d41..d93abc1 100644 --- a/README.md +++ b/README.md @@ -266,7 +266,7 @@ If the record to `DELETE` doesn't exist, the `UPDATE` will not be performed. If **NOTE:** Transaction support is designed for InnoDB tables (default). Other table types may not behave as expected. ## Reusing Persistent Connections -If you're using AWS Lambda, be sure to set `context.callbackWaitsForEmptyEventLoop = false;` in your main handler. This will allow the freezing of connections and will prevent Lambda from hanging on open connections. See [here](https://www.jeremydaly.com/reuse-database-connections-aws-lambda/) for more information. +If you're using AWS Lambda with **callbacks**, be sure to set `context.callbackWaitsForEmptyEventLoop = false;` in your main handler. This will allow the freezing of connections and will prevent Lambda from hanging on open connections. See [here](https://www.jeremydaly.com/reuse-database-connections-aws-lambda/) for more information. If you are using `async` functions, this is no longer necessary. ## Tests I've run *a lot* of tests using a number of different configurations. Ramp ups appear to work best, but once there are several warm containers, the response times are much better. Below is an example test I ran using AWS Lambda and Aurora Serverless. Aurora Serverless was configured with *2 ACUs* (and it didn't autoscale), so there were only **90 connections** available to the MySQL cluster. The Lambda function was configured with 1,024 MB of memory. This test simulated **500 users** per second for one minute. Each user ran a sample query retrieving a few rows from a table.