Giter VIP home page Giter VIP logo

spring-cloud-microservices-on-kubernetes's Introduction

项目说明

简介

有朋友们来咨询关于用Spring Cloud全家桶开发微服务应用的问题、以及在Kubernetes上编排部署Spring Cloud微服务、如何寻址的问题,因此萌发了将我以前在几个互联网项目中开发和k8s部署微服务实战中积累的最佳实践提炼出来分享的想法。本项目为一个浓缩了Spring Cloud Microservices on Kubernetes最佳实践的mini微服务应用参考,用于最佳实践的分享,技术演示了:

  1. 一个可快速复制的采用Spring Cloud全家桶来开发微服务应用的框架;
  2. 一套可快速复制的将Spring Cloud微服务部署到Kubernetes集群上的部署方案和YAML部署脚本(在生产项目应用中,这些YAML脚本应该需要部署到公司的CI & CD pipeline上以实现自动化的CI & CD)。

技术栈

  1. KubernetesRancher Server:作为自动化部署、伸缩和编排微服务容器集群的PaaS平台。

  2. Spring Cloud全家桶:用于开发微服务应用。采用目前最稳定的Edgware RELEASE,最佳搭配的全家桶组件有:

    • 开发:Zuul作为API Gateway,Eureka作为服务注册治理中心,Spring Cloud Config作为配置中心,Hystrix作为熔断器、降级和限流,Ribbon作为负载均衡,Feign作为声明式的REST Client。
    • 监控:Spring Boot Actuator+Spring Boor Admin提供每个微服务的自省和监控能力、以及可视化监控UI,Hystrix Dashboard用于可视化监控Hystrix Metrics,Turbine用于聚合各个微服务的Hystrix Metrics,SleuthZipkin用于分布式调用跟踪。
  3. Swagger & Swagger UI:用于REST API文档和兼作REST API调试。

  4. MyBatis:用于MySQL数据库访问ORM。

  5. RabbitMQ:用于可靠的消息服务中间件。

  6. Flyway:秉承DevOps一切均代码**,采用Flyway用于数据库升级的配置管理。

  7. 第三库:lombokguava

更新计划

  1. 采用RabbitMQ让各个微服务实例异步吐出Hystrix Metrics和Turbine进行异步采集聚合。
  2. 部署上ZipkinElasticsearch:估计虚拟机的配置需要升级才能跑得动:(。
  3. TCC柔性分布式事务处理的演示:需要再开发几个演示TCC的微服务。
  4. Spring Data JPA Repositories+Hibernate:演示另一种数据库ORM方案。
  5. 文档:增加&完善文档。

结语

感谢你的耐心阅读,如有对本项目中的Spring Cloud & Kubernetes的使用或者对本人的编码风格有更好的想法或者建议,欢迎通过邮件 [email protected]或QQ [email protected]与我取得联系,万分感谢。

spring-cloud-microservices-on-kubernetes's People

Contributors

albertzheng avatar jaysonzhao avatar

Watchers

 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.