database

Migrate EC2-Classic RDS to a VPC - Step 2 - DNS

In the plan blog post I sketched a plan to migrate an EC2-Classic RDS database to a VPC. Now we can perform the 2nd step of the plan. This is a simple step. Albeit, we have to understand what are the consequences. In your case, this approach might need adjustments! The RDS endpoint DNS When you create an RDS database…

Read

Migrate EC2-Classic RDS to a VPC - Step 1 - Replication

In the last blog post I sketched a plan to migrate an EC2-Classic RDS database to a VPC. It is time to dive into the details of setting up replication. There are great blog posts with an in-depth explanation of the SQL and PostgreSQL related aspects . We are going to focus on the automation of the replication setup…

Read

Migrate EC2-Classic RDS to a VPC - Planning

By end of August AWS will shut down EC2-Classic networking . All resources using EC2-Classic networking will stop working. Yes, this includes RDS databases. One of our clients was running a PostgreSQL RDS instance in EC2-Classic. We’ve notified the client about the necessary migration right after AWS published the news…

Read

In-memory database tests with Querydsl

Writing tests is an important skill of a software engineer. I used to write lots of very focused, narrow unit tests. However, I often found such tests to hinder refactoring and barely help in catching regressions. Whether such issues were caused by my poor design choices or are intrinsic to unit tests is not the focus…

Read

Database timeouts

Last time I have outlined the importance of timeouts. Without a carefully considered timeouts our application can become unresponsive easily. In this post I will focus on configuring various timeouts related to interaction with database. I am going to focus specifically on relational databases. The principles and…

Read

How to clear database in Spring Boot tests?

Nowadays using a production like database in unit1 tests is a common practice. Calling a real database can increase our confidence that a tested code actually works. Having said that a database, by its very nature, brings external state into a test that will affect its behavior, hence we need to pay special attention…

Read