Plate III · Filed under
Performance
Performance
8 entries
- 001
How Telegram renders animated stickers
A Telegram animated sticker is a few tens of kilobytes of vector maths, not a video. Here is the whole pipeline from a gzipped .tgs file to pixels on screen, pulled from the shipped Android binary.
Reverse EngineeringAndroidTelegramLottie - 002
Jev benchmarked on 5,574 real messages: accuracy, calibration and where it fails
No fine tuning, no examples, two labels and one endpoint. 98.73% accurate, and every confidence bucket turned out more right than it claimed to be.
JevAIPerformanceBackend - 003
PostgreSQL composite indexes: which column goes first
A multicolumn B-tree sorts by its first column, then its second. Why (a, b) and (b, a) are different indexes, and the rule that decides the order.
PostgreSQLDatabasesIndexingPerformance - 004
Database connection pool sizing: a pool is a queue with a depth
Every request waits in line for a connection. Little's law says how long the line is, why a bigger pool makes it slower, and how exhaustion cascades.
PostgreSQLBackendPerformanceReliability - 005
Backpressure: when the consumer is slower than the producer
An unbounded buffer does not fix a speed mismatch, it postpones the crash. Bounded queues, blocking sends and early rejection, and where each one belongs.
BackendDistributed SystemsReliabilityPerformance - 006
Fixed window vs sliding window vs token bucket rate limiting
A 100 per minute counter will pass 200 requests in two seconds at the window boundary. What a sliding window and a token bucket cost, and which to ship.
Rate LimitingRedisAPI DesignBackend - 007
UUID primary keys and write amplification in PostgreSQL
A UUIDv4 primary key scatters every insert across the B-tree, turning one logical write into several physical ones. The mechanism, and when it matters.
PostgreSQLDatabasesUUIDPerformance - 008
Keyset pagination vs OFFSET in PostgreSQL
OFFSET reads and discards every row it skips, and silently duplicates records when data shifts. Keyset pagination fixes both, at a price worth knowing.
PostgreSQLDatabasesAPI DesignPagination