Git Product home page Git Product logo

feign.net's Issues

url 配置

测试环境和正式环境地址不一样怎么办,

SteeltoeServiceDiscovery 服务发现的时候没有过滤不健康节点

SteeltoeServiceDiscovery.cs

public IList<IServiceInstance> GetServiceInstances(string serviceId)
        {
            return _discoveryClient.GetInstances(serviceId).Select(s => new SteeltoeServiceInstance(s)).ToList<IServiceInstance>();
        }

这个函数有个bug
GetInstances返回节点的时候,没有过滤不健康的节点.
所以集群里有机器下线了,feign请求就有概率失败

httpclient在core 2.1以后推荐用factory 初始化

HttpClient = new FeignHttpClient(new FeignDelegatingHandler(serviceDiscoveryHttpClientHandler));

好像还是使用了传统了方式new了client,
这个方式会带来性能问题
core 2.1以后引入了 HttpClientFactory, 并且引入了 HttpClientBuilder, 应该可以替代部分现有提供的pipeline
考虑升级一下版本?

SteeltoeServiceDiscovery3.0.1 请教一下,还需要什么配置?

我使用了SteeltoeServiceDiscovery3.0.1

//Steeltoe
services.AddDiscoveryClient(Configuration);
//Feign
services.AddFeignClients().AddSteeltoe();

第一个是可以访问服务,第二个不行,请问还需要配置什么吗?

[HttpGet("Get1")]
public async Task Get1()
{
var client = new HttpClient(_handler, false);
return await client.GetStringAsync("http://agent-service/weatherforecast");
}
[HttpGet("Get")]
public async Task<IEnumerable> Get2()
{
return await this.AngleSharpTestService.GetHtmlAsync();
}

补充文档

希望大神能出个文档之类的,更方便查阅使用。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.