Build a URL Shortener: Short Code Generation
Deep dive vào URL shortening algorithms. Implement Base62 encoding, handle collisions ở scale lớn, support custom aliases, và hiểu toán học đằng sau short code uniqueness và collision probability.
Tất cả bài viết với thẻ "backend"
Deep dive vào URL shortening algorithms. Implement Base62 encoding, handle collisions ở scale lớn, support custom aliases, và hiểu toán học đằng sau short code uniqueness và collision probability.
Thêm Redis caching và rate limiting vào URL shortener. Implement cache-aside pattern cho sub-millisecond redirects, sliding window rate limiting, cache invalidation strategies và Redis connection management.
Build redirect engine hiệu suất cao và hệ thống click analytics. Học 301 vs 302 redirects, non-blocking click tracking, user-agent parsing, geolocation, và analytics aggregation queries với PostgreSQL.
Thêm PostgreSQL và Prisma ORM vào URL shortener. Học database schema design, migrations, indexing strategies, connection pooling, và cách thay thế in-memory storage bằng persistent database queries.
Thêm JWT authentication, user registration và URL management vào URL shortener. Implement access và refresh tokens, bcrypt password hashing, auth middleware, user-scoped URLs và API key generation.
Setup project Express + TypeScript từ đầu và build endpoint URL shortening đầu tiên. Bao gồm project scaffolding, folder structure, URL validation, Base62 short codes, redirect handling và error middleware.
Nắm vững nền tảng durability của distributed systems: Write-Ahead Log cho crash recovery, Segmented Log để quản lý file, và Low-Water Mark để dọn dẹp log. Với ví dụ thực tế từ PostgreSQL, Kafka và etcd.
Làm chủ SQL nâng cao: window functions cho rankings và running totals, CTEs cho query composition dễ đọc, recursive queries cho dữ liệu phân cấp, và các hàm thiết yếu cho analytics thực tế.
Làm chủ distributed systems patterns từ write-ahead log đến consensus protocols. Lộ trình toàn diện covering durability, leader election, replication, partitioning, distributed time và cluster coordination.
Làm chủ frontend toolkit của Yii2 — GridView, ListView, DetailView, Pjax cho hiển thị data động, custom widgets, asset bundles quản lý CSS/JS, và tích hợp Bootstrap, Vue.js, React với Yii2.