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
docs: Add YugabyteDB smart driver features to Sequelize documentation
- Added note about smart driver features in Step 2
- New section: Using YugabyteDB Smart Driver features
- Load balancing configuration and modes
- Topology awareness for multi-region deployments
- Connection string examples with smart driver parameters
- Environment variables reference table
- Examples showing how to enable load balancing with process.env
- Documentation for all PGLOADBALANCE modes
- Examples for topology-aware routing
- Complete environment variables reference
This update helps developers leverage YugabyteDB's smart driver capabilities
for better performance, high availability, and geo-distributed applications.
Copy file name to clipboardExpand all lines: docs/content/stable/develop/drivers-orms/nodejs/sequelize.md
+104Lines changed: 104 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,16 @@ The following code creates an Employees model to store and retrieve employee inf
88
88
- The actual table is created by calling the `Employee.sync()` API in the `createTableAndInsert()` function. This also inserts the data for three employees into the table using the `Employee.create()` API.
89
89
- Finally, you can retrieve the information of all employees using `Employee.findAll()`.
The `sequelize-yugabytedb` package uses the YugabyteDB smart driver (`@yugabytedb/pg`) which provides advanced features like:
93
+
94
+
- **Load Balancing**: Automatically distribute queries across cluster nodes
95
+
- **Topology Awareness**: Route queries based on node location and availability
96
+
- **Connection Management**: Automatic failover and node discovery
97
+
98
+
These features are configured via environment variables or connection parameters. See the examples below for configuration options.
99
+
{{< /note >}}
100
+
91
101
Add the code in the `example.js` file.
92
102
93
103
```js
@@ -189,6 +199,100 @@ Employees Details:
189
199
]
190
200
```
191
201
202
+
## Using YugabyteDB Smart Driver features
203
+
204
+
The `sequelize-yugabytedb` package includes the YugabyteDB smart driver which provides cluster-aware connection management. You can enable these features using environment variables or configuration parameters.
205
+
206
+
### Load balancing
207
+
208
+
Configure load balancing to distribute queries across all nodes in your YugabyteDB cluster:
0 commit comments