Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Dynamically updated MultiHostDataSource host listΒ #5064

@careless6666

Description

@careless6666

Now we create data source like this

var dataSourceBuilder = new NpgsqlDataSourceBuilder(dbSettings.Value.ConnectionString);
dataSourceBuilder.BuildMultiHost();

It seems that this implementation implies a static connection string, but in our scenario we have our own ConfigurationProvider where we periodically update the list of hosts, for example, the database stopped coping with the load and additional replicas were added to it, it mean that we need to restart service. We need something like UsePeriodicPasswordProvider, ability update connection strings periodically

Is there any way to do what we want now?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions