Goodbye RestTemplate – let’s welcome WebClient Interface

RestTemplate has been declared “deprecated” since Spring Framework version 5.2.2.
WebClient is its announced substitute and brings the reactive approach at runtime.
So, this means not a simple “find & replace” might be enough, sometimes a code refactory is expected to move from imperative to functionals programming model.
Let’s see what this means with some examples.
Continue reading “Goodbye RestTemplate – let’s welcome WebClient Interface”

Make API predictable – HTTP Response Status Codes

Make Api predictable is a best practice that helps developers to keep code maintainable and avoid bugs. In the same way, Clients can use them without unexpected behaviours or pitfalls.

Give back a correct HTTP status based on action outcome and message produced, it’s a good behaviour to avoid misunderstanding with Client.

In this article I’ll illustrate what I’m talking about.

Continue reading “Make API predictable – HTTP Response Status Codes”

How Logstash can carry your logs for you

Logstash is a very useful tool to help you carry logs from your application inside a search engine as ElasticSearch for Log aggregations.
Once logs imported, you could analize them by using a visual dashboard as Kibana or Grafana. Let’s see how to bring them together through a brief example.
Continue reading “How Logstash can carry your logs for you”

RabbitMQ – Observability and Monitoring

Looking inside an application to understand how it’s going and what, potentially, is wrong is a “must have” when you’re drawing a solution.
RabbitMQ is not an exception at this requirement thus, we need in some way, to expose metrics and collects them for any monitoring tool.
Let’s see how to achieve this goal.
Continue reading “RabbitMQ – Observability and Monitoring”

RabbitMQ Exchange types – Put them into practice

Event Driven Architecture is a growing solution in a lot of projects where Event-Driven pattern is adopted.
RabbitMQ makes available a message broker to get communication between different components which different dispatchers or, as RabbitMQ named them, exchange to route the message in the right destination.
In this article I look at every exchanges by making an example using all of them in different context.
Continue reading “RabbitMQ Exchange types – Put them into practice”

Grafana – it’s not only a metrics matter

Metrics are useful, they tell you how your application is going, but they might not be enough when you came across an issue.
Applications produce logs, and you need to dig into them to find out what happened. Although they’re the backbone for application observability, it’s not simple reading logs spread among different files so, I tried to look inside them by using a Grafana Dashboard with log panel, and this is what I got.
Continue reading “Grafana – it’s not only a metrics matter”

irate() vs rate() – What’re they telling you?

Prometheus makes available great functions for data aggregation by timeline. Among these functions, I focused my analysis on irate() and rate() which give us similar outcomes but they work in different way.

Let’s see, by making an example, what happens under the hood to understand how it works.
Continue reading “irate() vs rate() – What’re they telling you?”

Pull and Push Metrics inside Grafana

Application monitoring is always a vital activity. Unfortunately, it’s not an easy task and, frequently, logs are not enough to work out problems as load average, run out of resources, and even application issue are difficult to diagnostic without combining metrics.
Therefore, we need the right tools inside an architecture to fill a data source with our application metrics.
Let’s have a look at different strategies to make application metrics available for Grafana.
Continue reading “Pull and Push Metrics inside Grafana”

Scale Up Jenkins with slave nodes

Scaling Jenkins in your organization based on jobs running is quite a common activity.
The more projects follow the CI/CD approach, the more Jenkins needs resources to keep up the number of Jobs and complete them without waiting too longer.
Have a look at how to scale up Jenkins platform with different strategies.
Continue reading “Scale Up Jenkins with slave nodes”