Running your JUnit 5 integration test with an embedded elasticsearch on a random port (and optionally Spring Boot)

With recent versions of elasticsearch (5+) the learning curve for an integration test became a bit steeper but will result in a cleaner solution in the end. In this article I will describe how to set up your test with JUnit 5 to run your elasticsearch integration tests. I will also discuss how to make it work with Spring-Boot Test.

Read more…

Advertisements

Using ZAP-proxy and nginx to debug and tamper with HTTP traffic – Emulate timeouts and other unexpected behaviour

I recently ran into a problem where I was unable to set a proxy in an application. I wanted to use this proxy as a man-in-the-middle proxy to debug an external web service call. I solved this problem by using nginx to redirect the traffic to the proxy. Since 99 out of 100 articles about nginx proxies are about reverse proxies I decided to write about a forward proxy to save you some time and show you some of the features of a man-in-the-middle proxy.

Read more…

Categories: English, work Tags: ,

Lessons learned after serving thousands of concurrent users in a devops team for a year

I just celebrated a year at a my customer. When I arrived the project was in a good shape with a few rough edges. There was a solid code review proces, a stable Jenkins server, motivated people, a reasonable amount of integration tests and a product owner who is very involved and very often in our vicinity. We serve thousands of users and our analist has the confidence to do a release at the busiest time of day.

Read more…

Categories: English, java, work Tags:

Introduction to Java heap tuning – Some easy steps to improve response times

At our current project we wanted to upgrade our EC2 instance to a newer family and generation to improve response times and make our application start faster. This simple task started with blindly increasing the heap size and ended with counting strings on the heap.

Read more…

Categories: English, java, work Tags: ,

When you tried high available logging and ended up with ‘mostly-available’ – How to setup Logback with GELF with TCP and HAProxy

Recently we ran into a problem where our logging disappeared sometimes. This happened after switching to an HAProxy load balancer. After many hours and some wireshark sessions we found an incorrect setting in HAProxy and apparently left out some important configuration in Logback. Idle connections were killed by HAProxy and we didn’t know there was a way to see that this happened.
This article may also be interesting when you run into disappearing or stale connections with HAProxy.

Read more…

Categories: English, java, work Tags: , , , , ,

Running java on Docker images on your Mac – A getting started guide

A few weeks ago I finally gave Docker a shot. It wasn’t a really smooth ride so I decided to write an article about it. I will run a Zookeeper as an example to get experience with Docker. After this description I’ll show you the obstacles I encountered and how to solve them. I will also provide some links to help you do some real life things with Docker.

Read more…

Categories: English, java, work Tags: , , ,

Setting up your logging with SLF4J – How to automate the prevention of mistakes and disappearing log statements

Properly setting up your logging is not as trivial as many people think. The big problem is that many people will stop worrying about their logging setup once they see logging output. There is a chance you forgot about the output of a few other logging libraries you transitively got into your project. This article will show you which libraries to use or exclude to prevent missing log statements. Then I’ll show a method to fail your build when a conflicting library accidentally crept into your project.

Read more…

Categories: English, java, work Tags: , , , , ,