The development of a software application goes through multiple stages like: requirement analysis, designing, coding, testing. Once testing is completed successfully, we need to deploy the application somewhere in a server so that users can access it from anywhere. Generally, we deploy the application in the Cloud environment. Heroku is the cloud environment that provides us deployable infrastructure. So, our topic of discussion in this article is 'How To Deploy Spring Boot Application to Heroku'? Spring Boot’s flexible packaging options provide a great deal of choice when it comes to deploying your application. You can deploy Spring Boot applications to a variety of cloud platforms, to virtual/real machines, or make them fully executable for Unix systems. Here in this article we
Spring Cloud Annotations With Examples
Introduction of new Annotations reduces the development efforts day by day. Needless to say, as a developer, we can't think of the development of an enterprise level application without using annotations, especially in applications that use Spring or related frameworks. Furthermore, we come across the Spring Cloud framework when we develop a Microservices based application. Now-a-days, there is a high demand of Microservices based applications in the industry. Therefore, it becomes very crucial to know the annotations used in Spring Cloud. Hence, in this article, we are going to discuss 'Spring Cloud Annotations With Examples'. We can't deny from the fact that the cloud is the future and, in the upcoming days, we will be seeing a lot of Java based
How To Implement Spring Cloud Config Server In Microservices
In a Microservices architecture based Java application, we have multiple microservices in the form of multiple Spring Boot applications. Each Spring Boot application will have its separate configuration file, where we specify the values in the form of key - value pairs. If you used maven in your application, you must have guessed that we are talking about nothing but application.properties file. You might have noticed that some of the entries in each application's application.properties file are common, such as registering with Eureka server, Email, Security, JPA configurations etc. If we can keep these common entries in one central place and make them accessible by each application, it will make our development easier. Therefore, How can we make a central repository
How To Implement Spring Cloud Gateway In Microservices
Microservices architecture offers us to deploy multiple services in different servers(hosts) in a private network. When a client request comes to microservices, it should get authenticated before the processing of request. Suppose we have 100 different services in a microservices based application. If client wants to interact with all of them, it will have to pass authentication 100 times. Reducing these many number of calls is one of the reasons to learn 'How To Implement Spring Cloud Gateway In Microservices'. If we have one service which takes care of authentication and also forward the request to concerned service, clients can get the response faster. Yes! We have such type of service which is responsible to do the same. It is nothing
How to Implement Feign Client in Spring Boot Microservices?
When two web applications communicate with each other for data exchange, they work on Producer-Consumer technique. An application who produces data is known as a Producer/Provider application. Similarly the one who consumes data is known as Consumer application. As a Java developer, we might be very familiar with REST API for Producer application whereas RestTemplate for Consumer application. With Microservices based application also, two Microservices communicate with each other and follow the Producer-Consumer model. Here, in consumer side, we use a concept 'Feign Client' as a better option instead of RestTemplate in order to minimize our effort of coding. Therefore, our topic of discussion is 'How to Implement Feign Client in Spring Boot Microservices?'. Apart from consuming REST services in an
How to implement Fault Tolerance in Microservices using Resilience4j?
When we develop an application, especially a Microservices-based applications, there are high chances that we experience some deviations while running it in real time. Sometimes, it could be slow response, network failures, REST call failures, failures due to the high number of requests and much more. In order to tolerate these kinds of suspected faults, we need to incorporate Fault Tolerance mechanism in our application. To achieve it, we will make use of Resilience4j library. Resilience4j is a lightweight, easy-to-use fault tolerance library inspired by Netflix Hystrix, but designed for Java 8 and functional programming. So, our focus in this article will be on 'How to implement Fault Tolerance in Microservices using Resilience4j?' After implementing the Fault Tolerance in Microservices using
How to Implement Distributed Logging Tracing using Sleuth Zipkin
In Microservices Architecture based Applications, there are multiple services which interact with each other. In order to serve a client request, one request may involve multiple microservices call to get the response. If any exception occurs or any latency issue appears during such calls, then how will we identify the root cause of the issue? Of course, we will make use of Spring Cloud Sleuth & Zipkin to support distributed logging & Tracing. Therefore, we are going to learn about 'How to implement Distributed Logging Tracing using Sleuth Zipkin' and related concepts accordingly. If we are working on a Standard application, we can implement logging by adding one log file to identify any exception or other issues like response timings or
How to Implement Hystrix Circuit Breaker in Microservices Application?
Microservices based applications feature a huge amount of distributed components. These components interact with each other during the request processing. As the number of interactions over the network increases, the possibility of an abnormal behavior of a service may also increase. In that case, we need to have some handy techniques that can prevent or minimize this abnormal behavior. Here, we are talking about none other than a fault-tolerance mechanism. The circuit breaker is fault-tolerance technique that monitors and detects when a service is behaving abnormally. It temporarily rejects those calls until the service becomes healthy again. Netflix Hystrix is an open source library which provides this solution. Hence, we are going to learn 'How to implement Hystrix Circuit Breaker in
How to register and discover Microservices using Netflix Eureka
In the series of Microservices Tutorial, we have already discussed on Microservices Architecture and Microservices in Java in a theoretical way. Now in this article, we will create an example by using Netflix Eureka in the context of Microservices. We will use Netflix Eureka to register & discover Microservices. In order to make intra-communication happen between multiple micro services, it is mandatory to register & discover them in the application. It is possible by using Netflix Eureka Server. Hence, we will talk about 'How to register and discover Microservices using Netflix Eureka?' in this article. In order to make communication happen among all microservices in an application, there should be a common medium. Furthermore, that common medium should have details of
The term Microservices was first introduced by Martin Fowler and used at a software architects’ workshop in 2011 for the first time. It is making a tremendous popularity among the development organizations' day by day. Likewise, the demand of Microservices developers is increasing exponentially. But have you ever thought that why it is becoming so popular? If you are not aware of Microservices Architecture, you just need to spend some minutes with me. You will observe that maximum number of your doubts are already clear, and the remaining you will be able to clear yourself while developing a project using this concept. However, theoretically taking on microservices is easy, but practically it is often not so straightforward. Needless to mention, each