Two frontend engineers built authentication.
Developer A ๐
Store JWT in localStorage
Developer B ๐
Store JWT in HttpOnly Cookies
Which design passes your security review?
How Kubernetes orchestrates pods
(clearly explained in under 1 min):
Kubernetes is a container orchestration platform that automatically deploys, manages, scales, and heals containerized applications.
Instead of manually managing containers, Kubernetes handles everything for you.
Hereโs a simple mental model to understand it:
๐ญ) ๐ฌ๐ผ๐ ๐ฑ๐ฒ๐ณ๐ถ๐ป๐ฒ ๐๐ต๐ฒ ๐ฑ๐ฒ๐๐ถ๐ฟ๐ฒ๐ฑ ๐๐๐ฎ๐๐ฒ
โณ You create a Deployment manifest
โณ Specify how many pod replicas should run
๐ฎ) ๐ง๐ต๐ฒ ๐ฆ๐ฐ๐ต๐ฒ๐ฑ๐๐น๐ฒ๐ฟ ๐ฝ๐น๐ฎ๐ฐ๐ฒ๐ ๐ฝ๐ผ๐ฑ๐
โณ Kubernetes chooses the best worker node
โณ Pods are distributed across available resources
๐ฏ) ๐ฃ๐ผ๐ฑ๐ ๐ฎ๐ฟ๐ฒ ๐ฐ๐ฟ๐ฒ๐ฎ๐๐ฒ๐ฑ
โณ The kubelet on each node starts containers
โณ Containers run inside pods
๐ฐ) ๐ฆ๐ฒ๐ฟ๐๐ถ๐ฐ๐ฒ๐ ๐ฒ๐ ๐ฝ๐ผ๐๐ฒ ๐ฝ๐ผ๐ฑ๐
โณ Pods can be reached through Services
โณ Traffic is load-balanced across replicas
๐ฑ) ๐๐๐ฏ๐ฒ๐ฟ๐ป๐ฒ๐๐ฒ๐ ๐ฐ๐ผ๐ป๐๐๐ฎ๐ป๐๐น๐ ๐บ๐ผ๐ป๐ถ๐๐ผ๐ฟ๐ ๐๐ต๐ฒ๐บ
โณ Health checks detect failures
โณ Crashed pods are automatically recreated
๐ฒ) ๐ฆ๐ฐ๐ฎ๐น๐ถ๐ป๐ด ๐ถ๐ ๐ฎ๐๐๐ผ๐บ๐ฎ๐๐ฒ๐ฑ
โณ More traffic โ more pod replicas
โณ Less traffic โ fewer replicas
๐ณ) ๐จ๐ฝ๐ฑ๐ฎ๐๐ฒ๐ ๐ฎ๐ฟ๐ฒ ๐ฟ๐ผ๐น๐น๐ฒ๐ฑ ๐ผ๐๐ ๐๐ฎ๐ณ๐ฒ๐น๐
โณ New pods are created gradually
โณ Old pods are removed with minimal downtime
That's the core idea behind Kubernetes orchestration.
You tell Kubernetes what you want.
Kubernetes continuously works to make reality match that desired state.
If you want hands-on Kubernetes projects, deployments, scaling strategies, and production-grade examples, check out this ebook:
https://t.co/vyboCdLTx0
What else would you add?
โโ
โป๏ธ Repost to help others learn DevOps.
๐ Remember to bookmark.
โ Follow me ( @e_opore ) to improve at software engineering.
Reminder: bots/scanners are CONSTANTLY scanning your websites.
Looking for vulnerabilities.
Including "useless" requests like "fake" Livewire POST update.
You may, of course, silence these, or... pay attention to crawling patterns and think how to secure your apps better.
๐ LocalCan 3.0 beta 2 is here with a Free mode!
Local domains (.local), and traffic inspection now work with no license - free for local-only dev. Enjoy!
Release notes in comments ๐
you can create a sticky navbar that morphs when you scroll with pure CSS, no JS or animation libraries required
๐๐๐๐๐๐ {
๐๐๐๐๐๐๐๐๐-๐๐ข๐๐: ๐๐๐๐๐๐-๐๐๐๐๐;
๐๐๐๐๐๐๐๐: ๐๐๐๐๐๐ข;
๐๐๐: ๐ถ;
}
@๐๐๐๐๐๐๐๐๐ ๐๐๐๐๐๐-๐๐๐๐๐(๐๐๐๐๐: ๐๐๐) {
.๐๐๐-๐๐๐ {
๐๐๐ก-๐ ๐๐๐๐: ๐ป๐ผ๐๐๐;
๐๐๐๐๐๐-๐๐๐๐๐๐: ๐ถ.๐ฝ๐ป๐๐๐;
๐๐๐๐๐๐๐๐๐๐: ๐๐๐(๐ธ๐ป๐ป ๐ธ๐ป๐ป ๐ธ๐ป๐ป / ๐ถ.๐ฟ๐ธ);
}
}
the browser now knows when a sticky element is stuck, all triggered by one container query
available only in chromium browsers only, no firefox or safari which is a shame
System Design Question:
User uploads a 500MB video.
Your API processes it synchronously.
Request times out after 30 seconds.
User retries.
Same file processes twice.
What are the two mistakes here?
A startup builds their
image upload system like this:
One endpoint handles everything:
1. Receive image upload
2. Resize to 3 different sizes synchronously
3. Save all 3 to local disk
4. Return response
Works fine for 10 uploads/day.
At 100,000 uploads/day
โ Image processing blocks the event loop
โ API times out for all other requests
โ Local disk fills up within weeks
โ No CDN images served from app server
โ Single server = single point of failure
โ Server restart wipes all uploaded images
What are the architectural mistakes here
and how would you redesign this
to handle millions of uploads
reliably and at scale?
A junior dev built a search feature
with pagination:
Works perfectly at page 1, 2, 3.
User jumps to page 50,000.
Server takes 45 seconds to respond.
Database CPU hits 100%.
What's the fundamental problem
with OFFSET pagination at scale
and what do you replace it with?
Your team is building a job queue system.
Requirements:
โ Process 50,000 jobs per day
โ Each job must run exactly once
โ Failed jobs must retry 3 times
โ Team of 4 developers
โ Already using PostgreSQL and Redis
You have 3 options:
A) BullMQ with Redis
โ battle tested, great UI dashboard
โ adds Redis dependency you already have
B) PostgreSQL-based queue (pg-boss)
โ no new infrastructure
โ uses DB you already have
โ slightly slower
C) AWS SQS
โ fully managed, no maintenance
โ costs money, adds cloud dependency
Which do you pick
and what's the one requirement
that makes your choice obvious?
๐จMust Have๐จ
- disable auto-updates for extensions in VS Code/Cursor + other forks (MacOS: Cmd + Shift + P -> "Disable Auto Updating Extensions")
- use static analysis (https://t.co/0re0oLjgCO) for GHA to catch security issues
- use https://t.co/64cwF4XjxI to update GHA to latest versions with SHA pinning
- add Socket Free Firewall (https://t.co/qldhK1yhDt) or safe-chain (https://t.co/IFB7976pwr) when installing npm packages
A startup builds their URL shortener like this:
One function handles everything:
1. Generate random short code
2. Insert into database
3. On redirect - query database
4. Update click count
5. Redirect user
Works perfectly at 1,000 URLs.
At 100 million URLs and
500,000 redirects per second
โ Random short codes start colliding
โ Every redirect hits the database
โ Click counter updates block redirects
โ Single database is the bottleneck
โ p99 latency goes from 10ms to 8 seconds
What are the architectural mistakes here
and how would you redesign this
to handle billions of URLs
and millions of redirects per second?
The vulnerability is an Algorithm Confusion / Key Confusion attack.
The server verifies JWTs like this:
jwt.verify(token, KEY)
But it never restricts allowed algorithms.
That means an attacker can:
- Change alg from RS256 โ HS256
- Use the PUBLIC key as the HMAC secret
- Forge arbitrary tokens like:
{ "role": "admin" }
Impact:
- Full auth bypass
- Privilege escalation
- Account takeover
- Admin access without private key compromise
Fix:
jwt.verify(token, KEY, { algorithms: ["RS256"] })
New version of Nostr VPN is out. Like tailscale, but no email addresses or 3rd party accounts, just public keys. New:
* native multiplatform user interfaces
* Nostr-based multihop routing (FIPS protocol) โ very useful when NAT holepunching fails
* improved network management UX