Skip to content
Discussion options

You must be logged in to vote

@NullRefer Hello Paddi, I'm not sure I understand what you're trying to achieve. Do both services offer the same functionalities?

If so, using Load Balancing with consul is a good strategy, but you will need a consul instance and to register your services to consul.
https://github.com/ggnaegi/SwizlyPeasy.Gateway/blob/master/SwizlyPeasy.Consul/ServiceRegistration/ServiceDiscoveryHostedService.cs

        var consulClient = CreateConsulClient(serviceDiscoveryConfig);
        services.AddSingleton<IConsulClient, ConsulClient>(p => consulClient);
...
    private static ConsulClient CreateConsulClient(ServiceDiscoveryConfig serviceConfig)
    {
        return new ConsulClient(config => { config.A…

Replies: 5 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@raman-m
Comment options

@NullRefer
Comment options

@raman-m
Comment options

Answer selected by raman-m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Service Discovery Ocelot feature: Service Discovery
3 participants
Converted from issue

This discussion was converted from issue #1725 on October 11, 2023 15:38.