Archive

Archive for the ‘java’ Category

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

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: , , , , ,

Why HTTP/2 with TLS is not supported properly in Java 8 – And what you can do about it

Recently I got a bit frustrated that Undertow is still the only HTTP/2 server in Java that properly supports HTTP/2 with TLS. Today I found out I was being unreasonable. After watching a talk it appeared there’s a good reason for it: TLS in Java cancels a large part of the latency improvement of HTTP/2.

Read more…

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