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
Copy file name to clipboardExpand all lines: docs/connecting.asciidoc
+71Lines changed: 71 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ This page contains the information you need to connect and use the Client with
8
8
9
9
* <<auth-reference, Authentication options>>
10
10
* <<client-usage, Using the client>>
11
+
* <<client-faas-env, Using the Client in a Function-as-a-Service Environment>>
11
12
* <<client-connect-proxy, Connecting through a proxy>>
12
13
* <<client-error-handling, Handling errors>>
13
14
* <<product-check, Automatic product check>>
@@ -419,6 +420,76 @@ _Default:_ `null`
419
420
_Default:_ `null`
420
421
|===
421
422
423
+
[discrete]
424
+
[[client-faas-env]]
425
+
=== Using the Client in a Function-as-a-Service Environment
426
+
427
+
This section illustrates the best practices for leveraging the {es} client in a Function-as-a-Service (FaaS) environment.
428
+
The most influential optimization is to initialize the client outside of the function, the global scope.
429
+
This practice does not only improve performance but also enables background functionality as – for example – https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[sniffing].
430
+
The following examples provide a skeleton for the best practices.
0 commit comments