- Hungry Minds
- Posts
- ๐๐ง Palantir's Database Index Pattern That Cut Query Times By 85%
๐๐ง Palantir's Database Index Pattern That Cut Query Times By 85%
PLUS: How Claude Code Works ๐ค, Master Rate Limiting Patterns ๐ฆ, OS Kernel From Scratch ๐๏ธ
Todayโs issue of Hungry Minds is brought to you by:

Happy Monday! โ๏ธ
Well, no, itโs Thursday! Iโm testing getting content out twice a week.
Would you like to receive content bi-weekly?
If you aren't subscribed yet, join smart, curious, and hungry folks by subscribing here.

๐ Software Engineering Articles
Master behavioral interviews with the CARL method framework
Writing an OS kernel from scratch; adventurous guide
New benchmark shows DuckDB outperforming Spark by 100x
Five essential rate limiting strategies explained simply
Obsidian's approach to preventing supply chain attacks
๐๏ธ Tech and AI Trends
Google integrates Gemini into Chrome for all users
Apple's new iPhone architecture puts AI first
Meta announces new Ray-Ban smart glasses
๐จ๐ปโ๐ป Coding Tip
Use objects instead of switch statements for cleaner, maintainable code
Time-to-digest: 5 minutes
Big thanks to our partners for keeping this newsletter free.
If you have a second, clicking the ad below helps us a tonโand who knows, you might find something you love. ๐
Aiven built a disk-less Kafka with 2 KIP:
โณ ~90% lower cloud data transfer fees by eliminating cross-AZ disk replication
โณ Zero-copy migration between classic and diskless topics
โณ Production-ready now with transactions and queues support

Palantir operates 300+ Elasticsearch clusters powering mission-critical workflows from geospatial defense operations to batch job orchestration. When upstream services use poorly-configured refresh policies, they can completely lock up entire ES nodes, bringing down essential infrastructure.
The challenge: Build defensive mechanisms into open-source Elasticsearch without forking the codebase, while maintaining API compatibility for existing clients across a complex microservices architecture.
Implementation highlights:
TransportInterceptor plugin: Hook into ES request pipeline to rewrite dangerous refresh policies before they execute
Concurrent sync-refresh detection: Track active immediate refreshes per shard and convert subsequent ones to
wait_for
to prevent lock contentionSmart policy downgrading: Automatically convert
wait_for
requests tonone
when refresh intervals exceed safe thresholds (>1s or -1)Telemetry-driven alerts: Emit metrics on every policy rewrite to notify client teams about problematic usage patterns
Thread pool protection: Prevent write thread exhaustion by eliminating scenarios where all threads block on refresh locks
Results and learnings:
Zero thread pool exhaustion: Eliminated complete node lockups from concurrent immediate refresh requests
Bounded wait times: No more indefinite blocking on
wait_for
requests with misconfigured refresh intervalsSeamless deployment: Maintained full API compatibility while adding defensive behavior across 300+ production clusters
Palantir's approach proves that defensive infrastructure can be built into third-party systems without sacrificing functionality. Their plugin strategy shows how to harden critical dependencies while preserving upgrade paths and community collaboration.

ARTICLE (code like an AI)
Shipping like Claude Code
ESSENTIAL (smoke detector for code)
How to Prevent Release-Day Disasters with Simple Smoke Tests
ARTICLE (stop the chaos!)
The Real Efficiency Bottleneck Isn't Planning, it's Thrash
ESSENTIAL (load balancer secrets)
What All Can A Load Balancer Do?
ARTICLE (game of Go)
Building Conway's Game of Life in Go with raylib-go
ARTICLE (css got faster)
styled-components maintenance mode: A 40% faster fork
ARTICLE (poke-clone-101)
OpenPoke: Recreating Poke's Architecture
ARTICLE (duck beats spark)
DuckDB benchmarked against Spark
ESSENTIAL (kernel cooking)
Writing an operating system kernel from scratch
Want to reach 190,000+ engineers?
Letโs work together! Whether itโs your product, service, or event, weโd love to help you connect with this awesome community.

Brief: Google integrates its flagship Gemini AI model into the Chrome browser, enhancing search capabilities with AI-powered features for millions of users worldwide.
Brief: Apple achieves complete in-house control of iPhone chip production, marking a strategic shift to optimize AI capabilities and reduce dependency on external suppliers while enhancing device performance.
Brief: Tesla's Chief Designer suggests company is considering a Cyber SUV and smaller Cybertruck for international markets, with a potential mock-up design spotted in recent promotional video despite earlier statements about not using stainless steel exoskeleton.
Brief: Meta reveals new Ray-Ban display glasses for $799, upgraded smart glasses with better battery life, athlete-focused Oakley glasses, and major updates including real space VR scanning, an entertainment hub, and enhanced Horizon Engine for the metaverse.
Brief: Developer demonstrates how to serve images over DNS by leveraging TCP connections and TXT records up to 64KB, challenging common assumptions about DNS limitations and potentially raising new security considerations.

This weekโs coding challenge:
This weekโs tip:
Use fetchpriority="high"
on critical above-the-fold images to bypass browser heuristics and ensure immediate loading. This attribute overrides default browser prioritization which may delay important content.

Wen?
Hero images on landing pages: Ensures the main visual loads before other resources
Product photos in e-commerce: Prioritizes the primary product image over thumbnails
Critical UI elements: Avatar images or logos that define page structure
Take care of your body. It's the only place you have to live.
Jim Rohn


Thatโs it for today! โ๏ธ
Enjoyed this issue? Send it to your friends here to sign up, or share it on Twitter!
If you want to submit a section to the newsletter or tell us what you think about todayโs issue, reply to this email or DM me on Twitter! ๐ฆ
Thanks for spending part of your Monday morning with Hungry Minds.
See you in a week โ Alex.
Icons by Icons8.
*I may earn a commission if you get a subscription through the links marked with โaff.โ (at no extra cost to you).