Ani
4K posts


@javarevisited One missing WHERE clause and congrats, every user is an admin now.
That’s instant privilege escalation, a security nightmare, and probably a production incident.
English

@SumitM_X Don’t pass huge files through microservices directly
Design:
Store files in object storage (e.g., Amazon S3)
Services exchange only metadata/URLs via API or queue
Use streaming/chunked upload for large payloads
CDN + compression for delivery
Move references,not giant payloads
English

@OjasSharma276 Think of context window like a whiteboard in d AI’s brain
Everything u type+everything AI replies gets written there,but d whiteboard has limited space
When filled:
Old notes get erased
AI forgets earlier parts
Responses become less accurate
Measured in tokens(chunks of text)
English

@javarevisited Verify the search pipeline
Check if search index is stale/corrupted
Compare DB data vs indexed data
Verify ranking/relevance config changes
Rebuild/re-sync index if needed
Check analyzers/tokenization/synonyms
Wrong results with no errors usually = indexing or ranking issue.
English

@ashoKumar89 Mostly JSONB in production.
Why?
Binary format -> faster queries/indexing
Supports GIN indexes
Better for filtering/search/updating JSON fields
JSON is mainly for storing exact raw text/formatting.
JSON = preserve input
JSONB = query efficiently at scale.
English

@javarevisited Powerful,but expensive at scale
Large joins = heavy CPU/memory/shuffle cost
Distributed joins across servers r slow
Can hurt latency under huge traffic
Big sys often:
Denormalize data
Precompute views
Use caching/search indexes
Trade storage duplication for speed&scalability
English

@javarevisited Don’t restart blindly,capture evidence fast
Check memory graphs-> heap vs non-heap growth
Take heap dump/profile(top objects,retaining refs)
Look for unbounded caches,listeners,queues,static refs
Compare snapshots over time
Find what keeps growing and why it’s still referenced
English

@javarevisited PostgreSQL JSON is powerful,but it’s still relational DB
NoSQL when:
Massive horizontal scaling
Flexible/high-velocity schemas
Ultra-high write throughput
Specialized models(document,graph,key-value)
PostgreSQL=versatility+consistency
NoSQL=scale/specific workload optimization
English

@javarevisited Usually poorly, or not effectively
!= is a negative condition, so DB may need to scan many rows because everything except completed could be huge.
Indexes work best for selective matches (=/ ranges).
Often causes full scan or weak index usage depending on data distribution.
English

@devops_nk Hard link=another name for the same file inode
Works even if original file is deleted
Can’t cross filesystems
Soft link (symlink)=shortcut/path to a file
Breaks if original is deleted
Can point across filesystems/directories
Hard link= same file
Symlink= reference to file path
English

@javarevisited Hashing hides the password, but identical passwords still produce identical hashes. Salting adds a unique random value before hashing, so even if two users use the same password, their hashes differ. This also blocks rainbow table and precomputed hash attacks.
English

@Sarthak4Alpha A virus is like a fake email attachment, you must open it first, so it needs user action to spread. A worm is like an automatic intruder that finds unlocked doors in a network and spreads by itself, infecting thousands of computers very quickly.
English

@faroque_eee @0xlelouch_ Yeah, it gives an approx count with small error(~1–2%) but is extremely memory efficient
If exact count is required:
Distributed hash partitioning
Deduplicate userIds per partition using HashSet/sorting
Merge counts across nodes
Accurate but much more memory+compute intensive
English

@0xlelouch_ Don’t try to load tables, partition first.
Hash both 500GB tables by join key into smaller buckets on disk
Same keys land in same bucket
Join matching bucket pairs one at a time in memory
Classic hash join / distributed join: divide -> local joins -> scalable
English

@SahilExec REST->multiple fixed endpoints(/users, /orders)
Simple,cache-friendly, great for stable APIs.
GraphQL->single endpoint where client asks exactly what it needs
Avoids over/under-fetching, ideal for complex UIs.
REST for simplicity/scalability, GraphQL for flexible data fetching
English

@pulkit_mittal_ JWT scales well because servers stay stateless, ideal for microservices. But revoking tokens/logout is hard. Redis sessions add a lookup but give better control, instant invalidation, and security. At scale, many systems use a hybrid of both.
English











