Docker Maven Plugin vs TestContainers – Integration Testing Why do we need these? With the advent of containerization, it has become possible to test how our code would behave and interact with each other when placed across containers. One of the most common use-cases is to be able to test database interactions. Although, we will…
Kubernetes Probes
Issue – Liveness probes causing other containers to restart While migrating from mesos to kubernetes cluster we transformed the marathon configuration files to kubernetes yaml file. Upon deployment it was observed that all the containers were restarting all the time. One of the configurations was health checks. Mesos health checks were migrated to kubernetes liveness…
Mesos CPU vs Kubernetes CPU requests, limits and docker
Recently, while migrating a mesos/marathon cluster to kubernetes, it was observed that the response time on kubernetes was substantially slow when compared to that of marathon. So, what can be compared out of the two that can give further insight into the issue. In both the setups, docker was the being used to run and…
Multi-tenant Database Design
Partition ID column New tenant creation – A new row is added to table with the new value in partition/tenant Id column. Other information for this tenant is correlated(with other tables) using the partition Id. Usage – This is useful in cases where the data being inserted into the tables from multiple tenants is not…
Design – Distributed Task Scheduler
Let’s go through the design depicted by the above image. Event scheduling manager This is the interface for creating, deleting or getting status of a job. Workflow Scheduling manager receives a request to create a job. Job metadata is stored in the Jobs DB via a rest call. Although depending on the influx of calls,…
TDD done wrong
TDD stands for test driven development. This translates to tests being written BEFORE the actual code. Let’s look at some of the code smells(and their possible remedies) which happen especially when tests are written AFTER the actual code. Lots of setup These are the tests where a lot of setup is required to get to…
Setting up opengrok using docker-compose
Opengrok is a code search engine. I have been using this tool from a few years and my dependency on this tool has only increased over time. Setting up opengrok has been a pain point for me in the past. Even recently when I tried upgrading from version 1.4 to 1.7, there were a number…
Basic ideologies behind moving to microservices
Below mentioned points try to summarize some of the basic idealogies that need to be followed and thought through before we take up any monolith to be migrated to a bunch of microservices. Have a very clear reason on why you are moving to microservices – Unless there is a use-case that gets satisfied its…
Migrating Monolith to Microservices – Strangler Fig Pattern for synchronous operations
With the adoption of micro-services, a lot of us are looking at ways to migrate existing monoliths into microservice architecture. There are multiple patterns which can be used depending on the need and scenarios. In this post, let us see how we can use strangler fig pattern to extract out microservices from an existing monolith….