You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Depending on the number of concurrent imitated users and the sleep time between requests the session based hit rates differed. In a sample ran with 10 users and 1 second between each request the hit rates were ```rates: 0.63,0.38,0.41,0.45,0.47,0.26,0.46,0.42,0.43,0.36```. Pretty good if each hit means we are saving 1 call to DynamoDB or S3.
88
+
Depending on the number of concurrent imitated users and the sleep time between requests the session based hit rates differed. In a sample ran with 10 users and up to 1 second between each request the hit rates were ```rates: 0.63,0.38,0.41,0.45,0.47,0.26,0.46,0.42,0.43,0.36```. Pretty good if each hit means we are saving 1 call to DynamoDB or S3.
89
89
90
-
In systems I've worked on we've seen in-memory session cache hit rates of close to 90%. However, your milage will vary based on user activity patterns and your exact cache usage, as with most performance enhancements it's good to measure before and after to see if the extra computation is worth it!
90
+
In systems I've worked on we've seen in-memory session cache hit rates as high as 90%. However, your milage will vary based on user activity patterns and your exact cache usage, as with most performance enhancements it's good to measure before and after to see if the extra computation is worth it!
91
91
92
92
# Notes
93
93
94
94
<bid="f1">[1]</b> Caches aren't the only upside of AWS reusing environments. You can also reactively or preemptively perform work.
95
95
96
96
For example if you want to perform post request user analytics (say enriching the logs with what country/state a user is from), you can queue that up to be done during the next request (just be careful of orphaned threads!).
97
97
98
-
Other common idea is to preemptively establish persistent connections to your databases/external services.
98
+
Another common idea is to preemptively establish persistent connections to your databases/external services. [↩](#a1)
0 commit comments