Giter VIP home page Giter VIP logo

siren-order-microservice's Introduction

spring-microservice

Spring Cloud와 쿠버네티스를 이용한 '커피 사이렌 오더' 마이크로서비스 프로젝트

전체 아키텍처 구성

image

배포 계획

image

MSA 기술 스택

API Gateway

  • Spring Cloud Gateway

Service Discovery

  • Spring Cloud Netflix Eureka

마이크로 서비스 개발

  • Spring MVC, JPA : User-service, Counter-service, Store-service
  • Spring Security, JWT : Config-service

Message Bus, 데이터 동기화

  • Kafka, Zookeeper : 서비스 간 메시지 produce, consume
  • Kafka UI : Kafka 동작 시각화
  • RabbitMQ : Spring Config 설정 Message Bus

Container

  • Docker : RabbitMQ, Prometheus, Grafana
  • Docker-Compose : Kafka, Zookeeper, Kafka-UI
  • Kubernetes
    • Deployment : apigateway-service, config-service, user-service, counter-service, store-service, frontend, mysql, zipkin
    • Service
      • ClusterIP : user-service, counter-service, store-service
      • NodePort : apigateway-service, config-service, discovery-service, frontend, mysql-svc, zipkin
    • Persistent Volume : MySQL

API Gateway

  • Spring Cloud Gateway

Database

  • H2 Database : User-service, Store-service
  • MySQL + PV, PVC : Counter-service

MSA 구성

  • 구성

    • Spring Cloud Eureka
  • 분산 추적

    • Zipkin
    • CircuitBreaker
    • Resilence4J
  • Configuration

    • Spring Cloud Config
      • Private Git
  • 서비스간 통신

    • FeignClient

모니터링

  • Grafana
  • Prometheus

siren-order-microservice's People

Contributors

jake-huen avatar

Stargazers

Sangjae Lee avatar

Watchers

 avatar

Forkers

i-m-nam

siren-order-microservice's Issues

서비스 아키텍처 구성

목적

서비스 아키텍처와 사용할 프레임워크 구성

작업 상세 내용

  • : 서비스 아키텍처 작성
  • : 사용할 프레임워크 구성

참고 문서

MySQL 연동

  • mysql-deployment.yml
  • pv.yaml
  • pvc.yaml
  • mysql-secret.yml

User MicroService 구현

기능 URI HTTP Method Description
전체 사용자 조회 /user-service/users GET 전체 사용자를 조회
회원가입 /user-service/users POST 사용자 추가(회원가입)
로그인 /user-service/login POST 로그인을 통해 JWT 토큰 제공해서 사용자 인증을 진행
사용자 정보, 커피 주문 내역 조회 /user-service/users/{user_id} GET 사용자가 주문한 모든 커피 내역들을 응답받음.
→ counter service에서 해당 사용자의 주문 내역들 FeignClient 사용해서 가지고 옴.      
작동상태 확인 /user-service/users/health_check GET 잘 동작하는지 상태확인 위함

MSA 아키텍처 구성

목적

  • MSA를 위한 구체적인 아키텍처 프레임워크 구성

상세 내용

  • : Spring Service Registry
  • : Spring Api Gateway
  • : Spring Config Server
  • : Microservices
  • : React FrontEnd

참고 항목

image

쿠버네티스 배포

  • User-service 배포
  • Discovery Service 배포
  • API Gateway 연결
  • User-service와 Discovery Service, API Gateway 연결
  • Store-Service 배포
  • Counter-Service 배포
  • DB 연동
  • Kafka 연동

Store Microservice 구현

기능 URI HTTP Method Description
커피 모든 메뉴 조회 /store-service/coffee GET 데이터베이스의 모든 커피 메뉴를 조회함
커피 메뉴 등록 /store-service/coffee POST 새로운 커피의 메뉴를 등록함
커피 특정 메뉴 조회 /store-service/coffee/{coffeeName} GET 특정 커피의 정보를 조회함

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.