All Projects → pranav-patil → spring-microservices

pranav-patil / spring-microservices

Licence: other
Spring Cloud Micro Services with Eureka Discovery, Zuul Proxy, OAuth2 Security, Hystrix CircuitBreaker, Sleuth Zipkin, ELK Stack Logging, Kafka, Docker and many new features

Programming Languages

java
68154 projects - #9 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to spring-microservices

Springcloud Learning
Spring Cloud基础教程,持续连载更新中
Stars: ✭ 6,839 (+5899.12%)
Mutual labels:  zuul, hystrix, eureka, zipkin
Xxproject
SpringCloud 微服务综合实例。分布式配置中心,服务发现&负载均衡,链路断路器,API网关,OAuth2认证授权,分布式追踪,ELK日志中心,Ansible/Docker持续交付等最佳实践。
Stars: ✭ 371 (+225.44%)
Mutual labels:  zuul, hystrix, eureka, zipkin
tictactoe-microservices-example
An example of Spring Cloud Microservices application based on books (see Links section)
Stars: ✭ 23 (-79.82%)
Mutual labels:  zuul, hystrix, eureka, zipkin
Spring Boot Cloud
基于 Spring Boot、Spring Cloud、Spring Oauth2 和 Spring Cloud Netflix 等框架构建的微服务项目
Stars: ✭ 2,044 (+1692.98%)
Mutual labels:  zuul, hystrix, eureka, zipkin
Spring Petclinic Microservices
Distributed version of Spring Petclinic built with Spring Cloud
Stars: ✭ 814 (+614.04%)
Mutual labels:  zuul, hystrix, eureka, zipkin
Superboot
随着技术日新月异,新技术新平台不断出现,对现如今的开发人员来说选择快速高效的框架进行项目开发,既能提高产出,又能节约时间。本框架无需开发即可实现服务注册、服务发现、负载均衡、服务网关、配置中心、API管理、分布式事务、支撑平台、集成框架、数据传输加密等功能,是学习SpringCloud整体业务模式的完整示例,并且可以直接用于生产环境
Stars: ✭ 341 (+199.12%)
Mutual labels:  boot, zuul, hystrix, eureka
Sample Spring Microservices
Many samples in different branches that shows how to create microservices with Spring Boot, Spring Cloud, Zipkin, Zuul, Eureka, Hystrix, Kubernetes, Elastic Stack and many more tools
Stars: ✭ 368 (+222.81%)
Mutual labels:  zuul, hystrix, eureka, zipkin
Spring Samples For All
spring、spring-boot、spring-cloud 常用整合用例
Stars: ✭ 401 (+251.75%)
Mutual labels:  zuul, hystrix, eureka, zipkin
Fw Spring Cloud
SpringCloud构建实战、从入门到高级,包含eureka、zuul、gateway、feign、ribbon、hystrix、mq、turbine、nacos、elk、consul、zookeeper、rocketmq、kafka、分布式事务(RocketMq、LCN、Seata)、分库分表(Sharding-JDBC)、分布式锁(Redis、Guava)、jwt、SkyWalking、Zipkin、bootadmin等使用案例
Stars: ✭ 276 (+142.11%)
Mutual labels:  zuul, hystrix, zipkin
spring-microservices
Example of a microservice architecture using Spring Cloud
Stars: ✭ 76 (-33.33%)
Mutual labels:  zuul, hystrix, eureka
Springcloud Learning
学习Spring Cloud框架的总结,使用的是最新的Hoxton版本。主要对包括但不限于Eureka、Ribbon、Hystrix、Zuul、Gateway、Security、Bus、OpenFeign等核心组件的用法进行详细介绍。
Stars: ✭ 129 (+13.16%)
Mutual labels:  zuul, hystrix, eureka
Jetfirecloud
基于SpringCloud Finchley.RELEASE的微服务开发脚手架,整合了spring-security-oauth2、springboot-admin、feign、hystrix、spring-cloud-gateway、turbine等全家桶
Stars: ✭ 129 (+13.16%)
Mutual labels:  hystrix, eureka, zipkin
Lamp Cloud
lamp-cloud 基于Jdk11 + SpringCloud + SpringBoot的微服务快速开发平台,其中的可配置的SaaS功能尤其闪耀, 具备RBAC功能、网关统一鉴权、Xss防跨站攻击、自动代码生成、多种存储系统、分布式事务、分布式定时任务等多个模块,支持多业务系统并行开发, 支持多服务并行开发,可以作为后端服务的开发脚手架。代码简洁,注释齐全,架构清晰,非常适合学习和企业作为基础框架使用。
Stars: ✭ 4,125 (+3518.42%)
Mutual labels:  zuul, hystrix, eureka
Spring Cloud
SpringCloud微服务架构,提供快速上手脚手架,快速构建高可用注册中心,高可用配置中心,加入Hystrix断路器,gateway服务官网,权限认证、服务降级、限流,加入应用监控
Stars: ✭ 130 (+14.04%)
Mutual labels:  zuul, hystrix, eureka
Simplemall
基于SpringCloud的微服务架构实战案例项目,以一个简单的购物流程为示例,融合spring cloud 相关组件,如spring-cloud-netflix、swagger等
Stars: ✭ 687 (+502.63%)
Mutual labels:  zuul, hystrix, eureka
Spring Cloud Study
SpringCloud源码实战微服务框架(202003更新到SpringCloud的Greenwich版本,即基于SpringBoot2.1.7版本,以及新增SpringCloud Alibaba从入门到精通教程),涉及内容:配置中心,注册中心,服务提供者,服务消费者,熔断器,配置服务,API Gateway,API网关限流ratelimit,服务链路追踪zipkin,hystrix监控,监控聚合中心turbine等
Stars: ✭ 215 (+88.6%)
Mutual labels:  zuul, hystrix, eureka
Connectors
Connectors simplify connecting to standalone and CloudFoundry services
Stars: ✭ 28 (-75.44%)
Mutual labels:  hystrix, eureka, circuit-breaker
Springcloud
基于SpringCloud2.1的微服务开发脚手架,整合了spring-security-oauth2、nacos、feign、sentinel、springcloud-gateway等。服务治理方面引入elasticsearch、skywalking、springboot-admin、zipkin等,让项目开发快速进入业务开发,而不需过多时间花费在架构搭建上。持续更新中
Stars: ✭ 6,997 (+6037.72%)
Mutual labels:  hystrix, eureka, zipkin
Spring Cloud Examples
Spring Cloud 学习案例,服务发现、服务治理、链路追踪、服务监控等
Stars: ✭ 5,829 (+5013.16%)
Mutual labels:  zuul, hystrix, eureka
Bookstoreapp Distributed Application
Ecommerce project is being developed using Spring Boot Microservices and Spring Cloud (Backend) and React (Frontend). Splitting the Ecommerce functionality into various individual microservices so that they can be distributed, scale really well and make use of resources efficiently.
Stars: ✭ 63 (-44.74%)
Mutual labels:  zuul, eureka, zipkin

Spring Micro Services Showcase

Microservices is an architectural style that structures an application as a collection of loosely coupled services, where each service implements business capabilities. A microservice runs in its own process and communicates other services via HTTP API. Every microservice can be deployed, upgraded, scaled, and restarted independently of the other services in an application. It enables continuous delivery/deployment of large, complex applications. It allows better component isolation and high resilience against component failures. Smaller components in microservices can be scaled easily to meet increasing demand for a specific component. It increases developer independence and allows parallel development across multiple smaller teams. Microservices brings additional complexity as the developers have to mitigate fault tolerance, network latency, and deal with load balancing. Also deployment and testing of such a distributed system is complicated and tedious.

Spring Boot enables to spawn stand-alone, production-grade Spring-based Applications with very little configuration, hence it is widely used in micro services arena. It is preconfigured with the Spring's standard configuration and has an embedded Tomcat or Jetty to provide full fledged server functionality. Spring Cloud framework, provides a collection of tools and solutions to some of the commonly encountered patterns when building distributed systems. It addresses solutions for some of the common problems in distributed systems including Configuration management, Service discovery, Circuit breakers and Distributed sessions. Docker is a open platform to create, deploy, and run applications as a lightweight, portable, self-sufficient container, which can run virtually anywhere. These tools and platforms form the foundation for spring micro services project.

The spring micro services showcase contains the following services in action:

  • Elastic Stack: ElasticSearch-Logstash-Kibana provides log storage and management.

  • Kafka Broker: Kafka Message broker provides messaging capabilities to zipkin trace messages to Zipkin server.

  • Zipkin Service: Zipkin enables to trace requests spanning across multiple services.

  • Config Service: Configuration service provides access to spring application.yml configuration files for corresponding service stored in its centralized (currently local) location.

  • Discovery Service: Eureka discovery service allows micro services to find and communicate with each other.

  • Authorization Service: Authorization service is responsible for providing OAuth2 access tokens after authentication and validating request access tokens before allowing access to the authorized services.

  • Data Service: Data service provides reactive services using Spring WebFlux to fetch various data (currently stock data).

  • Finance Service: Finance service provides services to fetch financial data especially stock details.

  • Analytics Service: Analytics services consume data from various sources, mainly finance-service and data-service and provide analytical details regarding the corresponding data.

  • Monitor Service: Monitor service gathers hystrix circuit breaker data from finance and analytics services, and displays the Hystrix Dashboard. It also includes Spring Boot® Admin dashboard which helps to monitor, manage and configure spring microservices.

    Spring Microservices

Setup and Running on Docker (Single Instance)

  • Run the ubuntu-docker-setup.sh script to setup java, gradle, docker and docker-compose. The script is specific to Ubuntu Bionic operating system but can be used as setup reference for other Linux systems as well.

  • Compile and build all the microservices using gradle with below command. For now ignore the tests with "-x test" as this is still work in progress.

      $ gradle build -x test
    
  • All the password variables in docker-compose.yml file are read from below system environment variables. Replace the below shell variables with corresponding password values to be used by individual services. If no value is provided for the below password variables then their value is treated as blank.

      $ export POSTGRES_PASSWORD=$POSTGRES_PASSWORD
      $ export MONGO_INITDB_ROOT_PASSWORD=$MONGO_INITDB_ROOT_PASSWORD
      $ export CONFIG_SERVICE_PASSWORD=$CONFIG_SERVICE_PASSWORD
      $ export CONFIG_KEYSTORE_PASSWORD=$CONFIG_KEYSTORE_PASSWORD
      $ export CONFIG_KEY_PASSWORD=$CONFIG_KEY_PASSWORD
      $ export AUTH_SERVICE_PASSWORD=$AUTH_SERVICE_PASSWORD
      $ export FINANCE_SERVICE_PASSWORD=$FINANCE_SERVICE_PASSWORD
      $ export ANALYTICS_SERVICE_PASSWORD=$ANALYTICS_SERVICE_PASSWORD
    
  • Use below docker-compose command to download images, create and start containers instances. The "-E" option allows to read all the newly created environment variables from the previous step.

      $ sudo -E docker-compose up -d
    

Testing Microservices using Postman

Postman is a client to test various HTTP services. Download Postman and install in your system. Open postman application, go to File -> Import opening import dialog. Click on Choose Files to import and select the spring-microservices.postman_collection.json from the repository. After import you see the collection spring-microservices on the left-side menu. Referring the postman docs, create environment, create variables namely hostname and select the environment before sending service requests.

Docker Management using Portainer

Once the docker containers are up and running please navigate to the Portainer UI at http://localhost:10001. Portainer provides a web UI over Docker which allows to easily manage and interact with Docker containers. During the first login, a admin password screen is displayed were an appropriate admin password is to be chosen. Next Portainer will ask about the Docker engine instance to be connected to. Please connect to the local instance since all containers are deployed on same machine, by choosing the Manage the Docker instance where Portainer is running option. Once connected to local docker engine we will be redirected to the Portainer home screen were we see all the list of containers created and running. We can get the details of any containers by clicking any one of the containers. The container details screen also enables to access basic container stats and logs. We can also SSH into the console using the Console link. Please refer to Portainer.io for further details of Portainer's features.

Docker Setup Notes

  • The above docker-compose up -d command would create all the containers and start all the services parallelly in background. Since virtually all the services are dependent on few core services namely postgres-service, config-service, discovery-service and authorization-service, this would cause other services to fail and restart again until they establish successful connections with core services.
  • It is important to note that docker-compose detects changes in the environment variables compared to existing service instance running with different environment variables. On launching a new service which depends on an already existing service whose environment variables are altered, docker-compose would first trigger recreation of existing (dependent) service instance with the current system environment variables before creating the launched instance.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].