23.
"Not just another" builder/founder/developer from India🇮🇳.
Looking to connect with more builders, indie hackers and founders across the globe.
Let's join hands if this sounds like you.
Python "asyncio": "await" vs "asyncio.create_task()"
They’re not interchangeable.
"await" waits for a coroutine to complete.
"asyncio.create_task()" schedules a coroutine to run concurrently with other tasks.
Here’s the difference:
# Sequential: ~4 seconds
await fetch("A")
await fetch("B")
# Concurrent: ~2 seconds
task_a = asyncio.create_task(fetch("A"))
task_b = asyncio.create_task(fetch("B"))
await task_a
await task_b
Why does this matter?
With sequential "await", B starts only after A finishes.
With "create_task()", both tasks can make progress while waiting for I/O.
Remember:
- "await" → wait for a result.
- "create_task()" → schedule concurrent work.
- "await task" → wait for scheduled work to finish.
When to use what?
Use "await" when the next operation depends on the current result.
Use "create_task()" when independent operations can overlap.
One caveat: "asyncio" provides concurrency, not automatic CPU parallelism.
Writing async code isn't enough. You need to structure it for concurrency.
A common FastAPI misconception: lifespan events run once for the entire application.
Not exactly.
They run once per application instance, typically once per worker process.
For example, if you start FastAPI with 4 Uvicorn workers:
uvicorn main:app --workers 4
And your lifespan looks like this:
@asynccontextmanager
async def lifespan(app: FastAPI):
print("Starting application")
app.state.cache = await create_cache()
yield
await app.state.cache.close()
You should expect the startup code to run in each worker process.
That means:
- 4 workers can create 4 cache instances.
- An ML model may load 4 times into memory.
- Each worker may create its own database connection pool.
- Shutdown cleanup runs separately for each worker.
Why does this matter?
If each worker's database pool allows 20 connections, 4 workers could allow up to 80 connections in total.
The key lesson: use lifespan for resources owned by a worker process. Use dependencies for request-scoped resources, and use external infrastructure when state must be shared across workers.
In FastAPI, understanding the process boundary is just as important as understanding the request lifecycle.
#FastAPI#Python#BackendEngineering
Why are teams moving from AWS ECS to EKS?
It's not always about performance. It's often about control, flexibility, and the Kubernetes ecosystem.
ECS offers simplicity and deep AWS integration.
EKS brings:
- Kubernetes ecosystem & tooling
- Advanced orchestration
- Platform engineering at scale
- Greater portability across environments
But Kubernetes comes with operational complexity and cost.
The real question isn't ECS vs. EKS.
It's: Does your system need Kubernetes, or is ECS already enough?
#AWS#EKS#ECS#Kubernetes#DistributedSystems
A 403 Forbidden error in Azure doesn't always mean you need to add another role assignment.
Before changing permissions, check:
→ Are you using the expected identity?
→ Does it have the required RBAC permissions?
→ Are ADLS Gen2 ACLs configured correctly?
→ Does the identity have execute permission on parent directories?
→ Is the application using a valid, current token?
Don't blindly add permissions to fix an access issue. Find the actual permission gap.
That's how you troubleshoot cloud security without creating unnecessary access.
Time is surprisingly dangerous in distributed systems.
A common mistake is assuming that wall-clock timestamps can establish causality.
Consider two nodes:
Node A: "10:00:00.100"
Node B: "10:00:00.050"
You might conclude:
"B → A"
But that conclusion can be wrong because clocks are not perfectly synchronized. NTP adjusts clocks, clock drift exists, and network delay makes the actual ordering of events unknowable from timestamps alone.
The deeper problem:
Wall-clock time tells you when a node thinks something happened, not necessarily the causal order of events.
That's why distributed systems use mechanisms such as:
- Lamport clocks — establish a partial ordering of events
- Vector clocks — track causal relationships between nodes
- Hybrid Logical Clocks — combine physical time with logical ordering
- Monotonic clocks — measure elapsed time without being affected by wall-clock adjustments
So when designing a distributed system, don't casually use:
"timestamp(A) < timestamp(B)"
as proof that:
"A happened before B".
In distributed systems, ordering is a protocol problem, not simply a timestamp problem.
174K Followers 9K FollowingScale your business with https://t.co/S7ETrP7Kn4
$ 180M+ Client Revenue Generated | 64 Awards And Counting | Agile Growth Systems That Move at Cheetah Speed.
796 Followers 714 FollowingCo-founder at https://t.co/qtEobRtokf, building the tools API companies need to document, generate SDKs, ship, monitor, and integrate their APIs, all from a single spec
1K Followers 1K Following💻 Building practical digital products.
🧩 Helping creators turn their knowledge into products their audience want
🎓 https://t.co/0uiNXJ1fF2
108K Followers 98K FollowingDiamtrader goes beyond rare diamonds and luxury jewelry. Where timeless beauty meets innovation, history and jewelry tradition.
3K Followers 2K Following💛💙Энергетика Украины и мира • Цены, прогноз, удары по НПЗ, газ, нефть. #energy Ежедневный анализ + @grok. Подписывайтесь, чтобы быть в курсе раньше всех💛💙
8K Followers 7K FollowingChia sẻ những thứ mình thấy thú vị ✨
Cuộc sống • Góc nhìn • Những điều linh tinh
Không có gì quá nghiêm túc, chỉ là mình thôi.
174K Followers 9K FollowingScale your business with https://t.co/S7ETrP7Kn4
$ 180M+ Client Revenue Generated | 64 Awards And Counting | Agile Growth Systems That Move at Cheetah Speed.
1K Followers 1K Following💻 Building practical digital products.
🧩 Helping creators turn their knowledge into products their audience want
🎓 https://t.co/0uiNXJ1fF2
796 Followers 714 FollowingCo-founder at https://t.co/qtEobRtokf, building the tools API companies need to document, generate SDKs, ship, monitor, and integrate their APIs, all from a single spec
53 Followers 161 FollowingThumbnail Designer 🎨
I design thumbnails built to earn the click
+20 thumbnail design & work with @FreeCryptoBro , @mosi_sm
📩Open for projects → DM
3K Followers 2K Following💛💙Энергетика Украины и мира • Цены, прогноз, удары по НПЗ, газ, нефть. #energy Ежедневный анализ + @grok. Подписывайтесь, чтобы быть в курсе раньше всех💛💙
108K Followers 98K FollowingDiamtrader goes beyond rare diamonds and luxury jewelry. Where timeless beauty meets innovation, history and jewelry tradition.