|
| 1 | + |
| 2 | + |
| 3 | +/* |
| 4 | + NDB Connection Properties |
| 5 | +
|
| 6 | +*/ |
| 7 | + |
| 8 | +var NdbDefaultConnectionProperties = { |
| 9 | + "implementation" : "ndb", // This must always be "ndb". |
| 10 | + |
| 11 | + "ndb_connectstring" : "localhost:1186", // MySQL Cluster Connect String |
| 12 | + "database" : "test", // MySQL Database name |
| 13 | + "mysql_user" : "root", |
| 14 | + |
| 15 | + /* The next 3 properties control the behavior when opening a connection. */ |
| 16 | + "ndb_connect_retries" : 4, // if < 0, keep trying forever |
| 17 | + "ndb_connect_delay" : 5, // full seconds between connection retries |
| 18 | + "ndb_connect_verbose" : 0, // enable extra console output |
| 19 | + |
| 20 | + "linger_on_close_msec": 500, /* When a client closes a DBConnectionPool, |
| 21 | + the underlying connection is kept open |
| 22 | + for this many milliseconds in case |
| 23 | + another client tries to re-open it. |
| 24 | + */ |
| 25 | + |
| 26 | + "use_ndb_async_api" : false, /* If true, some operations will be |
| 27 | + executed using asynchronous calls for |
| 28 | + improved concurrency. If false, the |
| 29 | + number of operations in transit will be |
| 30 | + limited to one per uv worker thread. |
| 31 | + */ |
| 32 | + |
| 33 | + "ndb_session_pool_min" : 4, |
| 34 | + "ndb_session_pool_max" : 100, /* Each NdbConnectionPool maintains a |
| 35 | + pool of DBSessions (and their underlying |
| 36 | + Ndb objects). These parameters set |
| 37 | + guidelines for the size of that pool. |
| 38 | + */ |
| 39 | + |
| 40 | + "ndb_session_concurrency" : 4 /* The number of concurrent transactions |
| 41 | + in an Ndb Session. Only one |
| 42 | + transaction at a time is visible to the |
| 43 | + user, but one may start before previous |
| 44 | + ones have finished executing. |
| 45 | + */ |
| 46 | +}; |
| 47 | + |
| 48 | +/* This file is valid JavaScript |
| 49 | +*/ |
| 50 | +module.exports = NdbDefaultConnectionProperties; |
0 commit comments