Kafka Improvement Proposals 101 - Leader Epoch

This post walks through KIP-101 — Alter Replication Protocol to use Leader Epoch rather than High Watermark for Truncation, the proposal that introduced the leader epoch to Kafka, along with some notes of my own. Log Replication Protocol Before we get to the leader epoch, let’s look at how a partition log replicates from the leader broker to its followers. The exact flow shifts a bit depending on the producer’s ack setting and min.isr, but I want to focus on the core mechanics here. ...

April 16, 2023 · 6 min · Donghyung Ko

[Diving into NestJS] 03. InstanceLoader and Injector

Intro Hi everyone. Last time, we covered how NestJS registers metadata for modules and their dependency objects. This time, let’s look at InstanceLoader and Injector, the two classes that manage the lifecycle (creation, injection, teardown) of the instances registered in each module. Dependency Injection in NestJS Dependency Injection (DI) is a programming approach where you declare the dependencies between instances up front, and hand off the work of parsing those relationships and creating instances to an IoC container, usually managed by the framework. A full explanation of DI is out of scope here. ...

November 28, 2022 · 9 min · Donghyung Ko

[Diving into NestJS] 02. @Module and DynamicModule

Hi everyone. Last time, we covered how NestFactory builds NestApplication. This time, let’s look at how Module, one of NestJS’s core building blocks, gets registered into your application. @Module NestJS declares a module with the @Module decorator. The official docs describe @Module as the way Nest gathers the metadata it needs to organize the application’s structure. (Note: “module” here means something different from the internal Module class NestJS uses under the hood.) ...

November 18, 2022 · 6 min · Donghyung Ko

[Diving into NestJS] 01. NestFactory

Hi everyone. Things have kept me busy lately, so it’s been a while since my last post. I want to start a series called “Diving into NestJS.” I picked up NestJS recently for work, and I kept running into friction because I didn’t understand its core well enough. So I decided to spend some time studying the framework from the inside out, mostly for my own benefit. For this first post, let’s look at NestFactory, the entry point for every NestJS application. ...

November 15, 2022 · 9 min · Donghyung Ko