3
votes

I am trying to create a spring cloud microservice by using spring boot framework.

  • I created a REST microservice by using spring boot framework.
  • I also created an Eureka server as another spring boot project. And I registered microservice to the Eureka server.
  • And I created another spring boot project for Zuul. This project also registered to Eureka server.

My Eureka server is running with 2 registered spring boot projects. Eureka server UI is properly working.

Here My confusion is that, am I following standard way of developing spring cloud microservice?

Since all documentations show this type of spring cloud development. And some blog shows spring cloud in another structure. So I am totally confused about whether I am going in proper way of spring cloud microservice development?

I am new to spring cloud. Can anyone clarify if my current architecture (Creating eureka server and microservice registration as client(Zuul also)) is proper???

1

1 Answers

3
votes

Your architecture is fine, but it still depends on your purpose.

Quote from this article - Spring Cloud Netflix, there are several common components used to build a micro-service architecture with Spring Cloud Netflix.

  • Service Discovery (Eureka)
  • Intelligent Routing (Zuul)
  • Circuit Breaker (Hystrix)
  • Client Side Load Balancing (Ribbon)

In my opinion, all these 4 components are required. So maybe you can explain what you want to achieve such as do you want to provide a service to many people or applications? Does your application need to be scaled out someday? Or if your service doesn't response after a long time, what will you do?