GithubHelp home page GithubHelp logo

lifeneedyou / micro-service Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lovnx/micro-service

1.0 0.0 0.0 222 KB

:gem: Spring Cloud demo based on Camden.SR5

License: Apache License 2.0

Java 100.00%

micro-service's Introduction

image image

spring-cloud 微服务组件demo

image

工程名 描述 端口
eureka-server 服务发现与注册中心 7070
ribbon 负载均衡器 7071
config-server 配置管理中心 7072
zuul 动态路由器 7073
service-A A服务,用来测试服务间调用与路由 7074
service-B B服务,整合Mybatis、PageHelper、Redis,整合接口限速方案,可选google Guava RateLimiter与自实现 7075
service-B2 B2服务,与B服务serviceId相同,用来测试负载均衡和容错 7076
hystrix-ribbon 负载均衡器的容错测试 7077
feign 声明式、模板化的HTTP客户端,可用来做负载均衡,较轻量 7078
hystrix-feign feign的容错测试 7079
hystrix-dashboard hystrix可视化监控台 7080
turbine 集群下hystrix可视化监控台 7081
sleuth 服务链路追踪 7082
service-admin spring boot admin监控台 7088

环境:JDK1.8 组件依赖版本:Camden.SR5

 <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.8</java.version>
  </properties>

有关项目启动和配置的说明:

1、最先启动的是eureka-server,并且你需要在整个测试过程中保持它的启动状态,因为它是注册中心,大多数服务必须依赖于它才能实现必要的功能。
2、如果你想测试配置中心,可以先启动config-server,再启动service-A,按照规则来获取config-server的配置信息。
3、如果你想测试负载均衡,则需启动ribbon、service-B、service-B2工程,在ribbon中配置自己需要的负载均衡策略,配置方法见:http://blog.csdn.net/rickiyeat/article/details/64918756
4、如果你想测试路由,则需启动zuul工程,另外需保证service-B、service-B2、service-A其中一个或者多个工程处于启动状态,按照zuul工程的配置文件来进行相应的操作。
5、如果你想查看spring boot admin监控台,则需启动service-admin、service-B工程,注意,spring boot admin工程需至少运行于JDK8环境。
6、如果你想测试熔断功能,则需启动hystrix-ribbon与ribbon或者feign与hystrix-feign工程。
7、如果你想查看断路器的监控台,请启动hystrix-dashboard(单机)和turbine(集群)工程,使用方法代码注释有写。
8、如果你想知道服务之间的调用情况,启动sleuth、service-B2、service-A。

联系方式:qq930999349

micro-service's People

Contributors

lovnx avatar

Stargazers

chenhua avatar

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.