Create a cluster

i would need to create a cluster.
I would like to create several application servers.

  1. How many network servers do I need to create? do i have to create one for each app-server? or can I create just one and share it with multiple application servers?

  2. If I create two network-servers how can I create an HA between them? Should I use a loadbalancer?
    Will the app-server then have to point to the address of the load balancer?

  3. what should i do for gateway bridges?
    to have a solution HA how many do I have to create? and how do I connect them together?

can you tell me how I can do it? with a short description?

thank you

If you create a pool of ChirpStack Network Server instances and a pool of ChirpStack Application Server instances, then you only have to create one ChirpStack Network Server through the web-interface. Make sure to point it to the load-balancer of that pool, not to a single instance.

Also make sure that in the ChirpStack Application Server config, the public hostname is set to the ChirpStack Application Server loadbalancer.

With regards to the number of items in the pools, that really depends on the use-case :slight_smile:

Thanks for the reply.
then through load balancer I manage the network servers.
then I create as many application server instances, as many as I need and point them to the load balancer of the network servers.

Do I have to create a database cluster for the NS and one for the APs or does each network server and application server need to have its own?

instead what about gateway bridge servers? do i have to put them under load balancer too?

thank you so much

how do i create the load balancer between the two network servers?
thank you so much

Hi brocaar,
i’ve created two docker network servers.
I’ve created a database machine and created the database for the network servers inside.
If I connect a network server to the new database this works, but if I try to connect the second network server to the same database it doesn’t work and reports the error

chirpstack-network-server_1 | time=“2021-07-20T17:47:41+02:00” level=fatal msg=“setup storage error: storage: applying PostgreSQL data migrations error: Unable to create migration plan because of 0032_increase_device_profile_reg_param_revision_len.sql: unknown migration in database”
chirpstack-docker_chirpstack-network-server_1 exited with code 1

can you help me please ?


I’ve changed on both network server the this parameter configuration:

And restarted both… they seems work!
What’s the effect? Can we use both with the same data configuration sets?
The next step is use haproxy in front of both

thank you

It is very likely that both the ChirpStack Application Server and Network Server are configured with the same database in case of this error. Please use separate databases. I think it is a good idea to make sure that you re-try again with two empty databases.