Remote debugging SpringBoot application

Remote debugging SpringBoot application

We all know how to run SpringBoot application in debug mode from our favorite IDEs(IntelliJ IDEA, Eclipse etc) and debug the code. Recently I had to debug a SpringBoot application which is running on a remote server.

There is already lot of information on the Internet on how to remote debug java applications, but some approaches didn’t work for me. So, here I would like to share my findings.

SpringBoot Best Practices

SpringBoot Best Practices

I have been working with SpringBoot for many years, and over time, I have worked with many Spring Boot-based codebases. There are a few common mistakes that I observe in projects that use Spring Boot. So, I thought of writing down a few good practices that can be followed while using Spring Boot.

MicroServices - Part 6 : Distributed Tracing with Spring Cloud Sleuth and Zipkin

MicroServices - Part 6 : Distributed Tracing with Spring Cloud Sleuth and Zipkin

One of the challenges in microservices architecture is the ability to debug issues. A simple user action might trigger a chain of downstream microservice calls. It would be tedious to trace the logs related to a particular user action across microservices. In addition to that, we might want to track down why a certain microservice call is taking so much time. We can use Spring Cloud Sleuth to handle these kinds of issues.

MicroServices - Part 5 : Spring Cloud Zuul Proxy as API Gateway

MicroServices - Part 5 : Spring Cloud Zuul Proxy as API Gateway

In microservices architecture, there could be a number of API services and few UI components that are talking to APIs. As of now, many microservices based application still use monolithic front-ends where the entire UI is built as a single module. You may choose to go with micro-frontends where the UI is also decomposed into multiple microservice talking to APIs to get the relevant data. Instead of letting UI know about all our microservices details we can provide a unified proxy interface that will delegate the calls to various microservices based on URL pattern. In this post, we will learn how to create API Gateway using Spring Cloud Zuul Proxy.

MicroServices - Part 4 : Spring Cloud Circuit Breaker using Netflix Hystrix

MicroServices - Part 4 : Spring Cloud Circuit Breaker using Netflix Hystrix

In the microservices world, to fulfill a client request one microservice may need to talk to other microservices. We should minimize this kind of direct dependencies on other microservices but in some cases it is unavoidable. If a microservice is down or not functioning properly then the issue may cascade up to the upstream services. Netflix created Hystrix library implementing Circuit Breaker pattern to address these kinds of issues.

MicroServices - Part 3 : Spring Cloud Service Registry and Discovery

MicroServices - Part 3 : Spring Cloud Service Registry and Discovery

In the microservices world, Service Registry and Discovery plays an important role because we most likely run multiple instances of services, and we need a mechanism to call other services without hardcoding their hostnames or port numbers. In addition to that, in Cloud environments, service instances may come up and go down at any time. So we need some automatic service registration and discovery mechanism. Spring Cloud provides Service Registry and Discovery features, as usual, with multiple options. We can use Netflix Eureka or Consul for Service Registry and Discovery.