Skip to content

Commit eb18f15

Browse files
committed
Update HA doc
1 parent 7af8400 commit eb18f15

File tree

1 file changed

+41
-28
lines changed

1 file changed

+41
-28
lines changed

doc/api.md

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6925,9 +6925,14 @@ version of the Oracle Client libraries.
69256925
If you are using Oracle Client 19c, the latest [Easy Connect Plus][151] syntax
69266926
allows the use of multiple hosts or ports, along with optional entries for the
69276927
wallet location, the distinguished name of the database server, and even lets
6928-
some network configuration options be set. This means that a
6929-
[`sqlnet.ora`](#tnsadmin) file is not needed for some common connection
6930-
scenarios.
6928+
some network configuration options be set. This means that
6929+
[`tnsnames.ora`](#tnsadmin) or [`sqlnet.ora`](#tnsadmin) files are not needed
6930+
for some further common connection scenarios. For example, if a firewall
6931+
terminates idle connections every four minutes, you may decide it is more
6932+
efficient to keep connections alive instead of having the overhead of
6933+
recreation. Your connection string could be
6934+
`"mydbmachine.example.com/orclpdb1?expire_time=3"` to send packets every three
6935+
minutes with the [`SQLNET.EXPIRE_TIME`][159] feature.
69316936

69326937
#### <a name="embedtns"></a> 14.2.2 Embedded Connect Descriptor Strings
69336938

@@ -7225,28 +7230,32 @@ on each connection.
72257230
If you increase the size of the pool, you must [increase the number of
72267231
threads](#numberofthreads) used by Node.js.
72277232

7228-
The growth characteristics of a connection pool are determined by the
7229-
Pool attributes [`poolIncrement`](#proppoolpoolincrement),
7233+
The growth characteristics of a connection pool are determined by the Pool
7234+
attributes [`poolIncrement`](#proppoolpoolincrement),
72307235
[`poolMax`](#proppoolpoolmax), [`poolMin`](#proppoolpoolmin) and
7231-
[`poolTimeout`](#proppoolpooltimeout). Note that when External
7232-
Authentication is used, the pool behavior is different, see
7233-
[External Authentication](#extauth).
7236+
[`poolTimeout`](#proppoolpooltimeout). Note that when [external
7237+
authentication](#extauth) or [heterogeneous pools](#connpoolproxy) are used, the
7238+
pool growth behavior is different.
72347239

72357240
Pool expansion happens when the following are all true: (i)
7236-
[`getConnection()`](#getconnectionpool) is called and (ii) all the
7237-
currently established connections in the pool are "checked out" by
7238-
previous `getConnection()` calls and are in-use by the application,
7239-
and (iii) the number of those connections is less than the pool's
7240-
`poolMax` setting.
7241-
7242-
The Oracle Real-World Performance Group's general recommendation for
7243-
client connection pools is for the pool to have a fixed sized. The
7244-
values of `poolMin` and `poolMax` should be the same (and
7245-
`poolIncrement` equal to zero), and the firewall, [resource
7246-
manager][101] or user profile [`IDLE_TIME`][100] should not expire
7247-
idle sessions. This avoids connection storms which can decrease
7248-
throughput. See [About Optimizing Real-World Performance with Static
7249-
Connection Pools][23], which contains details about sizing of pools.
7241+
[`pool.getConnection()`](#getconnectionpool) is called and (ii) all the
7242+
currently established connections in the pool are "checked out" by previous
7243+
`pool.getConnection()` calls and are in-use by the application, and (iii) the
7244+
number of those connections is less than the pool's `poolMax` setting.
7245+
7246+
The Oracle Real-World Performance Group's general recommendation for client
7247+
connection pools is to use a fixed sized. The values of `poolMin` and `poolMax`
7248+
should be the same (and `poolIncrement` equal to zero), and the firewall,
7249+
[resource manager][101] or user profile [`IDLE_TIME`][100] should not expire
7250+
idle sessions. This avoids connection storms which can decrease throughput.
7251+
See [Guideline for Preventing Connection Storms: Use Static Pools][23], which
7252+
contains details about sizing of pools. Having a fixed size will guarantee that
7253+
the database can handle the upper pool size. For example, if a pool needs to
7254+
grow but the database resources are limited, then you may see errors such as
7255+
*ORA-28547*. With a fixed pool size, this class of error will occur when the
7256+
pool is created, allowing you to change the size before users access the
7257+
application. With a dynamically growing pool, the error may occur much later
7258+
after the pool has been in use for some time.
72507259

72517260
The Pool attribute [`stmtCacheSize`](#propconnstmtcachesize) can be
72527261
used to set the statement cache size used by connections in the pool,
@@ -8426,11 +8435,14 @@ terminating idle connections.
84268435
You can configure your OS network settings and Oracle Net (which
84278436
handles communication between node-oracledb and the database).
84288437

8429-
For Oracle Net configuration, a [`tnsnames.ora`](#tnsnames) file can
8430-
be used to configure the database service settings such as for
8431-
failover using Oracle RAC or a standby database. A
8432-
[`ENABLE=BROKEN`][36] option can be used to aid detection of a
8433-
terminated remote server.
8438+
For Oracle Net configuration, a [`tnsnames.ora`](#tnsnames) file can be used to
8439+
configure the database service settings such as for failover using Oracle RAC or
8440+
a standby database.
8441+
8442+
A [`SQLNET.EXPIRE_TIME`][159] or [`ENABLE=BROKEN`][36] option can be used to
8443+
prevent firewalls from terminating connections. They can also aid detection of
8444+
a terminated remote database server. With Oracle Client 19c, you can use
8445+
`EXPIRE_TIME` in the [Easy Connect Plus](#easyconnect) connection string.
84348446

84358447
A [`sqlnet.ora`][136] file can be used to configure settings like
84368448
[`SQLNET.OUTBOUND_CONNECT_TIMEOUT`][33], [`SQLNET.RECV_TIMEOUT`][34]
@@ -13980,7 +13992,7 @@ can be asked at [AskTom][158].
1398013992
[20]: http://docs.libuv.org/en/v1.x/threadpool.html
1398113993
[21]: https://github.com/libuv/libuv
1398213994
[22]: https://github.com/oracle/node-oracledb/issues/603#issuecomment-277017313
13983-
[23]: https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-BC09F045-5D80-4AF5-93F5-FEF0531E0E1D
13995+
[23]: https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-7DFBA826-7CC0-4D16-B19C-31D168069B54
1398413996
[24]: https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-015CA8C1-2386-4626-855D-CC546DDC1086
1398513997
[25]: https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-661BB906-74D2-4C5D-9C7E-2798F76501B3
1398613998
[26]: http://www.oracle.com/technetwork/topics/php/php-scalability-ha-twp-128842.pdf
@@ -14114,3 +14126,4 @@ can be asked at [AskTom][158].
1411414126
[156]: http://yum.oracle.com/
1411514127
[157]: https://livesql.oracle.com/
1411614128
[158]: https://asktom.oracle.com/
14129+
[159]: https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-1070805B-0703-457C-8D2E-4EEC26193E5F

0 commit comments

Comments
 (0)