Comments (1)
arangojs manages the connection using an HTTP agent. By default it creates the agent for you and sets the maximum number of sockets it can use. You can either modify the options it uses to create the agent or create an agent yourself.
You can share an HTTP agent between multiple clients but arangojs internally creates an additional queue to prevent the agent from being flooded when a large number of new requests are made (this sounds inefficient but has drastically improved the performance).
Personally, I would just create one Database
(the class exported by arangojs) instance at startup and inject it into your express app.
If you don't find the default configuration to work for you, you should try adjusting the maxSockets
setting in agentOptions
and make sure it aligns with the number of V8 threads of your ArangoDB installation.
The recently published benchmarks were performed using arangojs with the default settings (except for maxSockets
), so that should give you an idea of the general characteristics.
from arangojs.
Related Issues (20)
- Replace XHR with Fetch HOT 1
- How to use "ForceOneShardAttributeValue" option in aqlQuery? HOT 3
- Better handling of arangojs' connection pool to avoid "socket hang up?" HOT 4
- Update driver Version in Tutorial
- db.exists() no longer a function? HOT 3
- collection.document failing with options HOT 2
- Infinite loop in connection.js:177 HOT 3
- connect ECONNREFUSED error HOT 1
- Type issue after updating to v8.4.0 HOT 3
- Are there any code examples demonstrating how to include AQL queries in a stream transaction? HOT 2
- Getting error "expecting POST /_api/cursor" from Arangojs HOT 14
- Jest detecting open handles HOT 3
- outEdges and inEdges not working HOT 2
- Getting error "expecting POST /_api/cursor" HOT 1
- Documentation is unclear about when actual server connection occurs HOT 2
- Rollup Error: Could not resolve "./analyzer" from "./analyzer?commonjs-external" HOT 2
- Separate Typescript definitions of a Collection's Documents, vs the object passed to the save function
- Nesting of AQL literal does not work HOT 2
- Link to documentation is down
- Batching requests for GraphQL server resolvers queries HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arangojs.