ityouknow / blog-comments

15 stars 0 forks source link

springcloud(十):服务网关zuul初级篇 - 纯洁的微笑的博客 #106

Open ityouknow opened 6 years ago

ityouknow commented 6 years ago

http://www.ityouknow.com/springcloud/2017/06/01/gateway-service-zuul.html

前面的文章我们介绍了,Eureka用于服务的注册于发现,Feign支持服务的调用以及均衡负载,Hystrix处理服务的熔断防止故障扩散,Spring Cloud Config服务集群配置中心,似乎一个微服务框架已经完成了。

YangYangDai commented 6 years ago

第二个例子中 匹配路径应该是 zuul.routes.hello.path=/producer/**

caztg commented 6 years ago

不错,支持一下!

sheiy commented 6 years ago

博主什么时候写个cloud security呗

Ruanyifei commented 6 years ago

请问一下伟大的博主,zuul技术一般都用在哪些场景下呢

hgw1993 commented 5 years ago

貌似会很容易超时,设置connect-timeout-millis 这个属性的值也不起作用,博主,我的是基于springboot2.0的

hgw1993 commented 5 years ago

貌似会很容易超时,设置connect-timeout-millis 这个属性的值也不起作用,博主,我的是基于springboot2.0的

已经解决了

goethoe commented 5 years ago

你倒是说怎么解决的啊,只说解决了气不气人呢

hgw1993 commented 5 years ago

@goethoe 你倒是说怎么解决的啊,只说解决了气不气人呢

你可以参照我的demo,https://github.com/hgw1993/spring-cloud-demo/blob/master/zuul-gateway/src/main/resources/application.yml

zhengw18 commented 5 years ago

配置路由规则时,routes后的节点命名有什么特殊规则么?

IceiceFire commented 5 years ago

很好的文章!

JavaOnly-SJ commented 5 years ago

网上的教程并不少,但是大多写的都是模模糊糊,可能作者自己只是学习过程的笔记,所以准确度有待商议,但是此文,我只能说,写的非常细致,非常好,对于我们这些新手来说就是福音,我代表所有新手搬砖员感谢博主。希望博主坚持下去,因为你是我们这些菜鸟不可或缺的学习导师。生活总是充满了希望,阳光总是比阴影要多,谁又比谁容易呢?愿广大学子,自强不息,厚积薄发,一鸣惊人,而后飞黄腾达而不忘初心!安好。

ityouknow commented 5 years ago

@JavaOnly-SJ 你的评论是我前进的动力,谢谢!

LTai123456 commented 5 years ago

有个问题一直解决不了,Caused by: java.lang.ClassNotFoundException: com.netflix.zuul.monitoring.TracerFactory,一直报这个错误,我import这个包确实有啊

xiemengnan commented 5 years ago

网上的教程并不少,但是纯洁的微笑真的是言简意赅,是初学者的福音啊。

baoziface commented 5 years ago

@xiemengnan 网上的教程并不少,但是纯洁的微笑真的是言简意赅,是初学者的福音啊。

的确

baoziface commented 5 years ago

@JavaOnly-SJ 网上的教程并不少,但是大多写的都是模模糊糊,可能作者自己只是学习过程的笔记,所以准确度有待商议,但是此文,我只能说,写的非常细致,非常好,对于我们这些新手来说就是福音,我代表所有新手搬砖员感谢博主。希望博主坚持下去,因为你是我们这些菜鸟不可或缺的学习导师。生活总是充满了希望,阳光总是比阴影要多,谁又比谁容易呢?愿广大学子,自强不息,厚积薄发,一鸣惊人,而后飞黄腾达而不忘初心!安好。

FunctionD commented 5 years ago

为啥zuul调用feign的module,熔断器不生效

wjzdl1314 commented 5 years ago

可以啊··

penghui0528 commented 5 years ago

牛逼

aloneDesperado commented 5 years ago

先赞再看

Jasonandy commented 5 years ago

赞一个

zhjs0523 commented 5 years ago

大神,看了您的文章,觉得非常不错。请教一个问题:我在学习zuul的时候遇到一个问题,就是我重定向到本地的A服务时,重定向的URL不能写127.0.0.1和localhost,只能写本机ip才能访问;但当我重定向到本地的B服务时(A服务和B服务所有配置都一样)写127.0.0.1和localhost就可以访问,这是什么个情况?

qq1012405911 commented 5 years ago

做我师傅吧0.0 很崇拜您 最急一直在看您的文章0.0

spynker commented 4 years ago

厉害

cyx441984694 commented 3 years ago

zuul.routes.api-a.path=/producer/** zuul.routes.api-a.serviceId=spring-cloud-producer 当使用这个的时候, 流量只会去spring-cloud-producer而不是spring-cloud-producer-2。 看log没看到动态均衡server list有cloud-producer-2: 2021-01-31 13:15:30.415 INFO 12952 --- [nio-8888-exec-1] c.n.l.DynamicServerListLoadBalancer : DynamicServerListLoadBalancer for client spring-cloud-producer initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=spring-cloud-producer,current list of Servers=[LAPTOP-VNBE4BVJ:9000, LAPTOP-VNBE4BVJ:9005],Load balancer stats=Zone stats: {defaultzone=[Zone:defaultzone; Instance count:2; Active connections count: 0; Circuit breaker tripped count: 0; Active connections per server: 0.0;] },Server stats: [[Server:LAPTOP-VNBE4BVJ:9005; Zone:defaultZone; Total Requests:0; Successive connection failure:0; Total blackout seconds:0; Last connection made:Thu Jan 01 08:00:00 CST 1970; First connection made: Thu Jan 01 08:00:00 CST 1970; Active Connections:0; total failure count in last (1000) msecs:0; average resp time:0.0; 90 percentile resp time:0.0; 95 percentile resp time:0.0; min resp time:0.0; max resp time:0.0; stddev resp time:0.0] , [Server:LAPTOP-VNBE4BVJ:9000; Zone:defaultZone;