Giter Club home page Giter Club logo

xxproject's Introduction

xxproject

SpringCloud 微服务综合实例。分布式配置中心,服务发现&负载均衡,链路断路器,API网关,OAuth2认证授权,分布式追踪,ELK日志中心,Docker持续交付等最佳实践。

Features:    

  • 分布式配置中心, 通过消息总线更新配置
  • Eureka实现服务端服务注册/服务发现/负载均衡
  • Feign实现客户端负载均衡
  • Hystrix实现链路断路器
  • Zuul实现API网关
  • Zipkin&Sleuth实现分布式追踪
  • 消息驱动
  • 分布式锁&信号量
  • 统一异常处理
  • 统一HTTP处理
  • 国际化
  • OAuth2.0与安全
  • API文档与测试
  • 批处理
  • 分布式任务调度
  • 分布式ID中心
  • 日志收集
  • 同步与异步调用
  • RPC调用
  • 其他最佳实践

Overview:    

  • 系统全景图:
    image

  • 技术实现:

    服务 实现方案 项目
    分布式配置中心 SpringCloud Config Server support/config-server
    服务注册/负载均衡 Netflix Eureka support/eureka-server
    客户端负载均衡 NetFlix Ribbon --
    链路保护与监控 NetFlix Hystrix support/turbine-server & support/hystrix-dashboard    
    API网关 NetFlix Zuul support/zuul-server
    分布式追踪调用链分析 SpringCloud Sleuth support/zipkin-server        
    OAuth2认证授权 SpringCloud Security OAuth support/auth-server
    基础服务 -- core/product-service & core/review-service    
    聚合服务 -- composite/product-composite-service  
    API服务 -- api/product-api-service
    日志处理 ELK --
    普通方式部署 Ansible Playbooks --
    容器化部署 Docker Compose --

Compile:

  • 编译构建为Jar包: mvn clean package

  • 编译构建为Docker镜像: mvn clean package docker:build, 镜像列表:    

    image

Deploy:

  • Jar方式部署: 可参考READM步骤

  • Docker方式部署: source bootstrap.rc && docker-compose up -d, 检查以下17个容器正常运行(容器数量较多,机器内存最好在8G以上,否则可能导致部分容器启动失败):        

    image
    image

  • 部署完成, 访问Eureka: http://localhost:8001/, 查看注册的服务实例如下:    image  

Enjoy:

xxproject's People

Contributors

junneyang avatar oudeismetis avatar

Watchers

cyg 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.