Hello everyone,
I have few questions since I’m newbie here
Is there a ready docker-compose file for a basic usage (as I know : 3 nodes type zone, 1 master with 2 joins, and read replicas ) to integrate with nodejs app
Can we use it on production using just docker without any problem ?
Let’s say we have 3 nodes, as I understand, when a client requests an api get / post, yugabyte will choose the best node for response same as load-balancers do ?
Thank you
We generally don’t recommend running Docker-based deployments in production. There are a few users in the community who are doing so. We recommend deploying YugabyteDB on Kubernetes to run production container workloads. Open source Kubernetes using YugabyteDB operator | YugabyteDB Docs
Yes, in the simplest of explanations, your understanding is correct. YugabyteDB distributes(shards) the data in all the available nodes of the universe, so the app doesn’t need to know where the data is located and can send the query ( SELECT/INSERTs) to any node and apps will get the required data.
Thank you for quick reply,
Actually I’m using this setup below, everything is created, and I can access to 7000, 15433, and I’m able to use ysqlsh and create roles, databases ..etc, but nothing is shown on 15433 => http://localhost:15433/databases/tabYsql
Docker-compose :
And when I try create database from nodejs, I get this error : error: SELECT PG_ADVISORY_UNLOCK('1') as lock_status; - advisory locks feature is currently in preview
/home/bkf/Work/Otlob/node_modules/@yugabytedb/pg/lib/client.js:230
throw new Error('Could not find a least loaded server.')
^
Error: Could not find a least loaded server.
at Client.getLeastLoadedServer (/home/bkf/Work/Otlob/node_modules/@yugabytedb/pg/lib/client.js:230:13)
at Client._connect (/home/bkf/Work/Otlob/node_modules/@yugabytedb/pg/lib/client.js:355:26)
at /home/bkf/Work/Otlob/node_modules/@yugabytedb/pg/lib/client.js:711:12
at new Promise (<anonymous>)
at Client.nowConnect (/home/bkf/Work/Otlob/node_modules/@yugabytedb/pg/lib/client.js:710:12)
at /home/bkf/Work/Otlob/node_modules/@yugabytedb/pg/lib/client.js:855:26
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
And in my node app developed by AdonisJs,
I got this :
error: SELECT PG_ADVISORY_UNLOCK('1') as lock_status; - advisory locks feature is currently in preview
⁃ Parser.parseErrorMessage
node_modules/pg-protocol/dist/parser.js:285
⁃ Parser.handlePacket
node_modules/pg-protocol/dist/parser.js:122
⁃ Parser.parse
node_modules/pg-protocol/dist/parser.js:35