Skip to content

Instantly share code, notes, and snippets.

View InKolev's full-sized avatar

Ivan Kolev InKolev

  • Bulgaria
View GitHub Profile

.NET 10 / C# 14 - Performance Optimization Guide

Target: .NET 10 (LTS) · C# 14 · Last updated March 2026

This guide is a curated set of 100 performance rules, tips, and idioms every developer on this project must know. Each entry is concise and actionable. Entries marked 🆕 leverage features new in .NET 10 / C# 14.


Table of Contents

Building and Maintaining Resilient Services

A Practical Engineering Guide Best practices for designing, operating, and scaling production-grade distributed systems.


Table of Contents

  1. Service Scope and Boundaries
{
"data": [
{
"time": "2025-07-17T08:00:00Z",
"percentage": 32.5,
"volume": 130.0,
"inflow": 3.8,
"outflow": 15.2,
"status": "warning",
"source": "estimate"

Multi-tenant Systems Troubleshooting Guide

A structured checklist for isolating, diagnosing, and resolving issues in shared-infrastructure systems.

For developers with limited multi-tenant experience and for people that need to refresh their knowledge and expertise on the subject.


How to Use This Guide

Find largest files on disk (where size is bigger than 100MB)

sudo find / -xdev -type f -size +100M -exec du -sh {} ';' | sort -rh | head -n50

PM2 node process manager

pm2 start ecosystem.config.js

Sample ecosystem file

Conway's law

"Any organization that designs a system, will produce a design
whose structure is a copy of the organization's communication structure."

Jimmy's law

"A broken, dysfunctional organization, driven by meeting unhealthy goals and metrics
will produce broken, dysfunctional systems, even if the developers in that organization are good."

Kosh (Babylon 5)

"The avalanche has already started. It is too late for the pebbles to vote."

Bet Settlement Worker (x1)

  • 40-50k items per minute (3000 cursor size, 1000 concurrency counter, 500 batch size, 250 ms timeout)

Account Operation Workers (x6)

  • 25-45k items per minute (with 3ms SQL Delay)
  • 30-50k items per minute (with 0ms SQL Delay)

Combo Bonus Workers (x6) (Slowest)

  • 18-40k items per minute (with 3ms SQL Delay)
  • 25-45k items per minute (with 0ms SQL Delay

librdkafka Performance Tuning Guide

Target version: librdkafka v2.13.x (latest stable as of March 2026) Applies to: All language bindings built on librdkafka - confluent-kafka-python, confluent-kafka-go, confluent-kafka-dotnet, node-rdkafka, Karafka/rdkafka-ruby, and others.


1. Building Kafka Performance from the Hardware Up

Before touching a single configuration property, ensure the underlying infrastructure matches the workload profile.

  1. Get authorization token POST
    http://craftcluster/api/FacebookLogin/GetAuthorizationToken?facebookAccessToken=...&facebookProfileId=...

Local IP addresses

Kafka: 172.18.0.4
Zookeeper: 172.18.0.2

Useful commands

  • Create a topic named integration-test-topic with two partitions:

    • kafka-topics --create --zookeeper 172.18.0.2:3001 --replication-factor 1 --partitions 2 --topic integration-test-topic
  • Check topic information:

  • kafka-topics --zookeeper 172.18.0.2:3001 --describe --topic integration-test-topic