SShortSingh.
Back to feed

Developer builds a URL shortener designed to handle 1.2 million requests per second

0
·3 views

A developer decided to build a URL shortener from scratch to practice system design, turning a classic interview question into a working project published on GitHub. The service generates random seven-character base62 codes, stores mappings in DynamoDB, and creates new codes whenever a collision occurs. Redirects are served through a CloudFront CDN that caches them, with the design sized for around 1 billion redirects per day and spikes up to 1.2 million requests per second. The author explains choosing 302 over 301 redirects so that links can be taken down through cache invalidation, and recounts design changes such as replacing Redis with a Postgres sequence and moving from EC2 to ECS.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Amazon và Meta đàm phán để AI agent Muse kết nối trực tiếp với gian hàng Amazon

Amazon và Meta đang tiến hành nhiều vòng đàm phán nhằm cho phép tác tử mua sắm Muse tích hợp trực tiếp vào hệ thống gian hàng của Amazon, theo Fortune. Động thái này diễn ra hai tháng sau khi các giao dịch từ Muse bị chặn ở bước thanh toán vào tháng 9/2026. Amazon bày tỏ lo ngại về tỷ lệ hoàn tất đơn hàng qua tác tử bên ngoài còn thấp và về độ ổn định vận hành của Muse. Một thách thức khác là mô hình doanh thu quảng cáo, vì tác tử có thể lọc kết quả và bỏ qua các vị trí được tài trợ. Bất kỳ thỏa thuận nào cũng cần sự phê duyệt từ CEO hai công ty, và cả hai bên chưa đưa ra phản hồi chính thức.

0
ProgrammingDEV Community ·

Study finds AI distillation transfers actions, not reasoning traces, boosting student agent scores

A new approach called CoT-Proxy trains student models on teacher agents' observation-action pairs while blanking out the reasoning text. Reported AppWorld results rise from 7% to 18% at 4B parameters and from 12% to 25% at 32B, against Qwen3.6-27B, though these figures come from the paper and have not been independently replicated. Students still perform well on tasks while generating their own reasoning style, suggesting that reasoning format is a byproduct of the teacher's training rather than a transferable capability. The findings challenge the common assumption that scratchpad traces must be copied and that format alignment is essential. The author argues that teams running agents in production could build distillation datasets from their own logs.

0
ProgrammingDEV Community ·

Serverless Postgres vs. AWS RDS: Break-Even Near 737 Compute-Hours a Month at 50 GB

Teams comparing Neon or Supabase with AWS RDS for PostgreSQL often talk past each other because the services bill different units. Using November 2026 US East list prices, the analysis finds a Neon Launch workload with 50 GB of storage costs more than a Multi-AZ RDS db.t4g.medium once it exceeds about 737 compute-hours per month. Below that threshold, idle-heavy databases can cost 60 to 80 percent less on serverless Postgres, while steadily busy workloads favor the fixed instance. The break-even point drops to about 242 compute-hours on a single-AZ setup, so the chosen baseline matters greatly. The article also compares idle behavior, high availability, branching, backups and compliance across the three platforms, and notes that its volumes are modeled rather than measured.

0
ProgrammingDEV Community ·

Cara menyemak ubat, suplemen dan kosmetik di Malaysia menggunakan nombor MAL dan NOT

Pembeli di Malaysia boleh menyemak status produk kesihatan dan kosmetik hanya dengan mencari nombor pendaftaran pada kotak, dan data rasminya diterbitkan secara terbuka di data.gov.my setiap hari. Nombor MAL merujuk produk berdaftar seperti ubat, suplemen dan produk tradisional yang diluluskan oleh PBKD, manakala nombor NOT merujuk kosmetik yang sekadar dinotifikasikan kepada NPRA. Set data itu menyenaraikan status, tarikh daftar dan luput serta bahan aktif bagi produk MAL, dan nama produk serta syarikat penotifikasi bagi produk NOT. Pihak berkuasa juga menerbitkan senarai pembatalan dan tarik balik berasingan kerana produk yang bersih pada awalnya boleh dibatalkan kemudian, terutamanya yang mengandungi bahan berbahaya seperti merkuri dan hidrokuinon. Fail data itu hanyalah salinan statik harian dan tidak boleh dijadikan asas tindakan undang-undang.