Akash Ranjan retweeted
Trading (fine, gambling) is a lonely art. Been getting bad press ever since Yudhishthira blew up at the dice table.
Glad I’ve got a friend in the trenches. We don’t call ourselves traders anymore. Depending on how expiry went, we’re…
- Stochastic Degens - bad decisions, backed by probability.
- Quant Casino Enthusiasts - it’s not gambling if there’s a spreadsheet.
- Zero-DTE Philosophers - by 3:25, we’re asking what money even is.
- VIX Romantics - attracted to instability.
- Professional Premium Donors - giving back to the market, one expiry at a time.
- Margin Call Connoisseurs - the broker calls us more than our friends do.
- Nifty Nuisances - the index moved 20 points and now it’s personal.
- Gamma Goblins - normal people until expiry day.
- Directors of Unforced Errors - finally, a title we’ve earned.
verified.sensibull.com/ps/gu…
I am neither Options Buyer , Nor Options Seller.
I am a Gambler
Like My Friend - @0xlelouch_ says, A Degen Gambler
This is Classic thundering herd + cache avalanche scenario. Here's what likely happened:
The sequence:
1. 9:14 AM — Redis restarts. All cached data is gone (cold cache).
2. 9:15 AM — Market opens. Massive traffic hits the system. Every request misses cache and slams the database directly.
3. The database gets overwhelmed — connection pool exhausted, queries queue up, CPU spikes. It can't handle the full read load without cache absorption.
4. Even though Redis is healthy by 9:14:04, the database is already drowning. It stays saturated because:
· Cache is cold — every request still goes to DB until cache is warmed
· Retry storms from clients amplify the load
· Connection pool is clogged with slow queries
· No circuit breaker to shed load
The 41-minute gap = time for the DB to recover from the initial stampede (backlog drain, connection pool reset, cache gradual warming).
Fixes:
· Cache warm-up on Redis restart (preload hot keys)
· Circuit breaker + request throttling during cache misses
· Staggered cache TTLs (avoid synchronized expiry)
· Read replicas to absorb cold-cache traffic
· Rate limiting at the API gateway before market open
The interviewer is testing whether you understand cache dependency failure modes, not just Redis basics.
Zerodha staff system design round:
Interviewer: "Your Redis cache restarts at 9:14 AM. It's back up in 4 seconds.
Market opens at 9:15.
Your database stays down until 9:55, even though Redis has been healthy since 9:14.
What happened?"
1
119
Markets rallied today just because the Finance Minister said she is willing to hear views on removing LTCG tax.
Imagine if she actually removes it one fine day. Another potential 'Nirmala candle' loading.
1
5
137
Akash Ranjan retweeted
Despite buying for nearly ₹20 lakh crore over the last three years, DIIs have barely managed to move the market by even a percentage point.
So the question isn’t how much more support DIIs need to provide.
The real support has to come from policymakers through better policies.
"85% of PRs shipped by AI" is a masterclass in twisting metrics.
Yes, internal tools auto-bumping dependencies, fixing linter rules, or generating boilerplate count as "PRs." No, an AI agent is not resolving race conditions in a distributed system or designing a Kafka partition strategy while the engineer takes a nap.
Deleting your IDE is how you transition from an Engineer to a Passenger. The job isn't generating syntax. The job is Verification. Keep your tools.
Google engineer:
“Just delete your IDE—you don’t need it anymore. Ask Claude Code to run Claude Code for you.
85% of PRs at Google are already shipped by AI agents. If you aren’t building the harness around your agents, it’s crazy how far behind you are.”
In this 90-minute talk, a Google engineer with 30 years of experience explains what the future of AI engineering will look like.
Worth more than 10 paid agentic engineering courses.
Watch it today, then read the article below to learn how to build a harness for reliable, self-improving AI agents.
1
2
121
This is the perfect roadmap. I would just add a
Stage 13: Chaos & Recovery.
• What happens when a node dies mid-epoch?
• How do you handle a corrupted KV cache under load?
• What is the fallback when your spot instances get reclaimed during a traffic spike?
If I had 6 months to become an AI Infrastructure Engineer.
I'd do this.
Stage 1: Linux, Networking, and Python Foundations
Linux, bash, SSH, TCP/HTTP, DNS, Python, async programming, systemd.
Stage 2: Containers and Orchestration
Docker, Kubernetes, Helm, GPU scheduling, resource limits, multi-node clusters.
Stage 3: GPU Fundamentals
CUDA basics, nvidia-smi, VRAM math, NVLink and InfiniBand, MIG partitioning.
Stage 4: Model Serving
vLLM, SGLang, TGI, continuous batching, KV cache management, quantization (AWQ, FP8).
Stage 5: Inference Optimization
Speculative decoding, prefix caching, chunked prefill, TensorRT-LLM, Triton kernels.
Stage 6: Model Distribution and Storage
Weight sharding, safetensors, model registries, CDN for weights, lazy loading.
Stage 7: GPU Autoscaling
KEDA, queue-based scaling, cold start mitigation, spot instances, multi-region failover.
Stage 8: Training Infrastructure
Ray and Slurm, FSDP and tensor parallelism, checkpointing, fault tolerance, gradient accumulation.
Stage 9: AI Gateway Layer
Routing, load balancing, fallback chains, rate limiting, per-tenant token budgets.
Stage 10: Observability and FinOps
GPU utilization (DCGM), TTFT and ITL metrics, cost per token, tenant dashboards, alerting.
Stage 11: Security and Multi-Tenancy
Tenant isolation, secrets management, sandboxed execution, audit logs, compliance controls.
Stage 12: Portfolio and Public Benchmarks
Ship a self-hosted inference cluster, publish latency and cost benchmarks, write architecture teardowns.
Most people stay stuck watching tutorials.
Builders get hired.
(Bookmark it)
2
4
149
Akash Ranjan retweeted
System design: payment ledger reconciliation with retries (generic, but how it works in prod)
1) Requirements
- Ledger is source of truth. Append-only entries: (account_id, currency, amount, direction, reference_id)
- Reconcile external provider payouts/charges vs internal ledger
- At-least-once ingestion of provider files/webhooks. Exactly-once posting via idempotency
- SLOs: reconcile lag p95 < 5 min, correctness over freshness
- Support backfills for 30-180 days, and partial replays without double counting
2) API shape
- POST /ledger/entries idempotency_key, reference_id, amount, currency, metadata
- POST /recon/runs {provider, date_range, mode=incremental|backfill}
- GET /recon/runs/{run_id} status + counters (matched, missing_internal, missing_external, duplicates)
- POST /recon/runs/{run_id}/retry?scope=failed|all&reason=…
3) Data model (boring and strict)
- ledger_entries(id, account_id, currency, amount, ref_type, ref_id, occurred_at, created_at)
- unique(ref_type, ref_id) to prevent double-posting
- provider_events(id, provider, provider_event_id, payload_hash, occurred_at, ingested_at, status)
- unique(provider, provider_event_id)
- recon_runs(id, provider, from_ts, to_ts, state, started_at, finished_at)
- recon_items(id, run_id, match_key, internal_entry_id nullable, provider_event_id nullable, state, error_code, attempts, next_attempt_at)
- recon_checkpoints(provider, cursor) for incremental pulls
4) Async flow
- Ingest provider events into provider_events (webhook or file). Store raw payload + normalized fields
- Build match_key (ex: provider_txn_id, or (merchant_ref, amount, currency, day))
- Recon worker reads recon_items where next_attempt_at <= now
1) load provider_event + attempt to find internal ledger entry by unique ref
2) if missing internal, enqueue create-entry command (or mark discrepancy depending on business rule)
3) if both present, mark matched and write an audit record
- Use an outbox table for any side effects (posting ledger entries, notifying finance), publish to Kafka/SQS
5) Retries that don’t melt the system
- Per-item attempts with exponential backoff + jitter, cap at 10-20 tries
- Retry budget per run (ex: max 1% of items retrying concurrently) to avoid DB storms
- Classify errors:
- transient: timeouts, 5xx, serialization conflicts
- permanent: schema mismatch, invalid currency, missing required ref
- Poison items go to a dead-letter queue with the normalized payload + last error
6) Scaling
- Partition recon_items by provider + day (or run_id ranges) so workers can claim batches with SKIP LOCKED
- Store provider_events in object storage if payloads are big; keep hashes + key fields in DB
- For large backfills: stream provider data, write recon_items in chunks (10k), checkpoint progress
7) Failure modes to call out in interviews
- Duplicate provider events: unique(provider, provider_event_id) + idempotent posting prevents double ledger entries
- Out-of-order events: match on stable IDs, not timestamps; allow late matches by keeping unmatched windows open
- Partial outages: recon continues, but posting ledger entries can lag; track separately
- Race: two workers match same item; use row-level locks on recon_items and unique constraints on ledger_entries
- Bad match_key design causes false matches. Keep match rules versioned and auditable
8) Observability (what actually helps)
- Metrics: recon_lag_seconds, match_rate, discrepancy_rate, retry_queue_depth, attempts_histogram, DLQ_count
- Tracing: propagate run_id + provider_event_id into every job/log line
- Logs: structured reasons for state transitions (matched, created_internal, missing_external, permanent_failure)
- Dashboards per provider/day; alert on rising discrepancy_rate or retries > baseline, not just on worker errors
Akash Ranjan retweeted
90% of backend engineering interviews in 2026 come down to these 7 points:
1) Data modeling + indexes
Explain your schema, keys, and the one index that makes p95 drop. Mention cardinality and write amp.
2) API contracts + idempotency
Show how you avoid double charges and duplicate creates: idempotency keys, request hashes, safe retries.
3) Concurrency + correctness
Race conditions, transactions, isolation levels, and what you do when two workers update the same row.
4) Performance under load
Where latency comes from: N+1s, slow queries, connection pools, backpressure, and realistic caches (TTL + invalidation).
5) Distributed failures
Timeouts, retries with jitter, circuit breakers, and what happens when a dependency is half down for 20 minutes.
6) Messaging and async work
Queues/streams, at-least-once delivery, dedupe, ordering per key, and why outbox beats dual-write.
7) Production hygiene
Logs/metrics/traces, SLOs, deploy/rollback, migrations, and the first 3 checks in an incident (recent deploys, error rate, saturation)
Akash Ranjan retweeted
Spoke to a professional whose salary went from 8L to 60L in 6 years
Compensation spike was largely due to switching 4 jobs, rather than being in the same org
Recently laid off and struggling, job-hopping driven salary boosting may be in danger
Akash Ranjan retweeted
Since Aug 2024:
Silver: +192%
Gold: +121%
FD: +16%
Savings: +6%
Cash: 0%
Sensex: -6%
Grandma's holdings are whitewashing your portfolio
The hedonic treadmill is a reminder:
Big wins don't keep you happy. They just raise the floor.
Real contentment comes from the small things, the ones that don't spike the chart but make the baseline worth living.
1
5
86
Akash Ranjan retweeted
What’s the most useless tech stack or tool you were forced to use at work, and what did it cost (deploy time, outages, lost features, headcount)? Include the year and team size.
Giving an agent tools isn't enough. It needs loops.
Production-ready agents need the right loops around them — loops that help them complete tasks, verify their work, respond to real-world events, and improve over time.
Most agents fail not because the model is weak, but because the feedback loop is missing.
You give it a tool. It takes an action. Then what?
- Did it succeed?
- Did it hallucinate?
- Did it take the right path?
- Should it try again differently?
The fix: Loop Engineering.
-> Execution loops — guide the agent step-by-step toward task completion
->Verification loops — catch errors before they propagate
-> Event loops — respond to changes in the real world
-> Learning loops — improve performance over time using past runs
Where does human oversight fit? Right in the middle — not as a bottleneck, but as a guardrail at critical decision points.
Build agents that are not just capable — but observable, testable, and continuously improving.
4
71
Your AI agent worked once in your terminal. That doesn't mean it works
Most people think they've built a successful agent because it ran perfectly once. But there's a massive gap between a flashy demo and a robust system that works reliably in production.
The teams shipping real-world agents aren't relying on "vibe evals" or guessing.
The fix: Systematic evals, not vibes.
-> Move past traditional ML grading — LLM outputs are open-ended, essay-style.
-> Use Overlap, Semantic, and Model-Based metrics.
-> Build a Golden Dataset and set up a Continuous Evaluation Loop
-> Leverage tools like Promptfoo, Ragas, LangSmith, and Braintrust
Always remember your agent isn't production-ready because it worked once. It's ready because you've proven it works every time.
1
5
78
Coding agents are powerful. But unsandboxed? They're a liability.
Breaking it down simply:
Don't try to outsmart the agent — isolate it."
Real horror stories are everywhere:
-> Agents hardcoding API keys into public repos
-> Wiping entire home directories
-> Dropping uncommitted Git history
These aren't hypothetical bugs. They're human errors amplified by tools optimized for action, not caution.
The fix? Sandbox everything.
-> Run agents in Docker or microVMs — isolated kernel, filesystem, network
-> Use --debug-file to log every tool call, command, and response
-> Start each session fresh — no leftover context, no surprises
-> Your agent should be a helper, not a hazard. Sandbox first. Ship second.
8
92
Don't ship AI skills without evals.
Shipping skills without testing is like deploying code without unit tests — unreliable agent behavior is guaranteed.
Yet most teams ship more features than they actually evaluate.
The fix? Build a lightweight eval harness:
-> Define success criteria
-> Run each test twice: with the skill vs without it (or vs previous version)
-> Start from a clean slate every run — no leftover memory or context
-> Catch failures before they reach users
Evals aren't a testing step. They're a production guard that runs on every output, every time.
Skills need evals, not vibes.
2
65
Akash Ranjan retweeted
if you wanna do just enough to stay employable for the next few years
learn backend engineering!
if you wanna stay employable and also solve real scaling, reliability and distributed systems problems
learn backend + devops!
if you wanna work on the most interesting infra problems while staying close to where the industry is moving
learn backend + devops + AI infrastructure!
When i say AI infrastructure, i do not mean building another chatbot wrapper.
I mean model serving, GPU utilization, batching, caching, evaluation, observability, data pipelines and keeping inference reliable in production.
You do not need to become an AI researcher.
But understanding how models are trained, deployed, monitored and optimized might become the new minimum for serious backend engineers.
if you wanna do just the minimum to keep your job secure
do devops!
if you wanna keep your job secure and also work on some nice problems (and you know ... take up bit of a challenge)
do rust+devops!
if you wanna be the best i.e. do something challenging while keeping your job secure while being at the forefront of every other interesting stuff witnessed by our generation
do rust+devops+AI!
When i say AI, i mean mostly MLOps and how to train models etc .. that's the minimum - applied AI engineer, you can go deeper if you want!
10 things that should immediately block a Frontend PR (and the resources to learn them):
1. Memory Leaks: (Learn: Chrome DevTools Memory Heap Snapshots).
2. Accessibility Violations: (Learn: eslint-plugin-jsx-a11y & screen reader basics).
3.Prop Drilling Hell: (Learn: Component Composition / Context API).
4.Unsanitized Inputs: (Learn: DOMPurify and Cross-Site Scripting vectors).
5.Main Thread Blocking: (Learn: Web Workers for heavy client-side processing).
6.Un-cached Heavy Computations: (Learn: useMemo vs just moving it out of the render cycle).
7.Stale State: (Learn: Cache invalidation strategies in React Query/SWR).
8.Layout Shifts: Image without height/width tags? Automatic PR rejection.
(Learn: Cumulative Layout Shift).
9. Vague Fallbacks: Infinite spinners kill conversion. (Learn: Skeleton loaders and Suspense).
10.Missing Error Boundaries: Don't let one bad component unmount the whole React tree.
10 practical resources to learn API design (stuff you’ll use in reviews + on-call):
1) API Design Patterns (JJ Geewax)
Concrete patterns for resource modeling, error shapes, pagination, idempotency.
2) REST API Design Rulebook (Mark Masse)
Short, opinionated rules. Great for naming, status codes, and consistency.
3) Build APIs You Won’t Hate (Phil Sturgeon)
Real-world tradeoffs and the boring details teams fight over.
4) Microsoft REST API Guidelines
Strong on long-lived enterprise APIs: versioning, breaking changes, and compatibility.
5) Google AIP (API Improvement Proposals)
How big orgs enforce consistency at scale. Especially useful for list/filter patterns.
6) OpenAPI Specification + “Design-first” workflow
Write an OpenAPI file, generate clients/servers, and stop debating endpoints in Slack.
7) Postman collection examples + contract tests
Turn docs into executable tests. Catch backward-incompatible changes before deploy.
8) OWASP API Security Top 10
API design is security design. Authn/authz boundaries, mass assignment, rate limits.
9) Stripe API docs
Gold standard for ergonomics: pagination, expansions, idempotency keys, errors.
10) Practice project: build a webhook-driven system
Implement signature verification, retries, dedupe keys, replay protection, and event versioning
1
145
I see a lot of engineers asking "which framework should I learn?"
The question you should actually be asking is:
"What problem am I trying to solve?"
What are the tradeoffs of each tool?
How does this fit into my team's context?"
Tools are just vehicles. The real craft is understanding the terrain.
67
Akash Ranjan retweeted
One thing I do not like about prompts is how we hardcode them in code. Every prompt change leads to a code change, followed by a redeployment.
Hence, today I am launching px0 - an open-source prompt infrastructure toolkit that lets you version, update, and govern prompts in production, eliminating the need to hardcode prompts or redeploy your application.
It is ready to use with a complete API suite, management console, and SDKs in languages that we typically use to prompt LLMs - Python, Node.js, and Go. Here is a gist of the benefits
- no hardcoded prompt strings
- deploy-free prompt updates
- 5-line SDK integration - py, js, and go
- prompt versioning and lifecycle management
- self-host in your own cloud or VPC
- fully open source under the MIT license
Also, many more features are coming out in the next few weeks.
If you decide to give it a shot (link below) and run into any issues or have feature ideas, feel free to open an issue or a feature request. I would love to hear.
If you like the project and find it useful, please star the repo and show some love :) It would mean a ton.











