Database Replication in MySQL

Replication Replication means keeping a copy of the same data on multiple machines that are connected via a network. We assume that our dataset is small enough to hold a copy of the entire dataset. Benefits of replication include: [Read More]
Tags: Databases

2023 Recap

Today is the last working day of 2023, and it’s time to look back at what I have accomplished this year: [Read More]
Tags: YearRecap

Experience working with NULL in MySQL

Last week, I encountered a scenario that perfectly illustrates the quirks of working with NULL values in MySQL. I thought it might be beneficial to share my experience, as it could save someone else a bit of head-scratching. [Read More]
Tags: Databases

Understanding L4 and L7 Load Balancing

In the internet, where traffic constantly increases, load balancing is crucial in distributing network traffic across multiple servers. This ensures that no single server bears an excessive load, thereby improving the responsiveness and availability of applications. Two types of load balancing are commonly used: Layer 4 (L4) and Layer 7 (L7) load balancing. [Read More]
Tags: LoadBalancer

Understanding and Resolving Spring DataBufferLimitException

In the world of Spring Webflux, you may encounter a DataBufferLimitException. This exception can be a bit perplexing if you’re not familiar with how Spring handles data streams. In this blog post, I’ll demystify this exception, explain why it occurs, and provide a solution on how to resolve it. What is DataBufferLimitException? When you send a request to an API and receive a response, the data in the request or response body is managed as a stream of DataBuffer chunks. Spring Webflux has a default limit on the number of bytes that can be buffered whenever the input stream needs... [Read More]
Tags: Spring Webflux

Understanding Collation in MySQL

Collation rules in MySQL define the sequence in which characters are sorted and how they match. These rules are crucial for data retrieval, comparison, and sorting operations. The default collation in MySQL varies depending on the version you are using. Default Collation in MySQL For MySQL versions from 5.5.3 to 5.7, the default collation is utf8mb4_general_ci for the utf8mb4 character set. This collation is case-insensitive, making it an excellent choice for general international Unicode data. However, it’s important to note that it does not support accent-sensitive comparisons. [Read More]

Git revert commits from fork repository

Sometimes, while working on a forked repository, you might find yourself needing to revert your repository to match the upstream repository (the original repository from which you forked). Whether you made a mistake or just need to synchronize with the latest changes, you can do this without losing your contributions on GitHub. Here’s a step-by-step guide to help you through the process. [Read More]
Tags: Git

A Comparative Study of Terminologies in ElasticSearch and MySQL

Although SQL and Elasticsearch have different terms for the way the data is organized (and different semantics), these analogies can help those with a relational database background understand Elasticsearch. However, it’s important to recognize that these analogies are not perfect, as there are fundamental differences in how each system stores and manages data. Terminologies and data types [Read More]

How to maintain Kafka client connectivity

When Kafka is running, I mean producer/consumer connected to server and published/subscribed messages normally, what happen when Kafka server is down? Today, to answer this, I try to stop Kafka server (on my local machine): Firstly, the Kafka consumer is still running normally (maybe forever until the server is up), that what I expected. Secondly, the Kafka producer was terminated by these exceptions: Caused by: org.apache.kafka.common.errors.TimeoutException: Topic <> not present in metadata after 60000 ms. The exception was thrown by this config parameter: kafka.max.block.ms is expired, the default is 60000s. Caused by: org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for <>:120010 ms has... [Read More]

My Journey with Composite Indexes in MySQL

In MySQL, if a single index is solely used to weed out rows to be reviewed, I didn’t see much of a difference between a single index and a composite index based on my prior experience. However, I had a personal experience with one last week. I want to share something with you today. [Read More]