This is why I love Go.
A team migrated a service from Scala to Go.
53% less CPU usage
83% less memory usage
48x smaller image
And honestly, even after 4 years, Go is still such a charm to write (and yeah, i still write code).
https://t.co/6EprG5RMFn
Redis is fast, but it comes with durability trade-offs.
Since Redis stores data in memory, a node crash can result in data loss, especially if recent writes haven't been persisted to disk.
So, be careful about what you store in Redis and whether your system can tolerate losing it
One of the coolest upgrade that came in HTTP/2 is the multiplexing. In http/1.1 we have to make multiple request concurrently then, either we have to wait for the first to finish or open a second TCP connection or do the pipelining. Multiplexing fixed that.
#softwareEngineering
If you have a backend webhook API, make sure to process requests asynchronously and keep the handler idempotent.
Most webhook providers can send multiple requests for the same work. We can’t let a third-party system overwhelm our system or process the same event twice.
I will call myself a good reader when i will be able to read a complete RFC document in one sitting. My last best attempt was RFC 9112 (HTTP/1.1). I was able to read around 80% of it.implemented minimal few core features of it
https://t.co/J3yK8QYdV0
Hash Table is one of the fundamental and solid data structure used widely in most of the language internals and implementing hashmap/sets.
@arpit_bhayani have a very nice playlist around this
https://t.co/wUpaMAAvL2
As coding agents continue to improve, what matters more than ever is a solid understanding of systems, sound engineering judgment, and product sense.
Lately, I’ve been spending a lot of time reading engineering blogs.
HTTP headers are one of the most flexible and extensible parts of API design. Think about it: I’m so opinionated that I always prefer header-based API versioning over URL-based versioning.
What do you think?
Please stop returning something like this in your API responses,
StatusCode: 200
Body: {
success: false,
message: "You messed up."
}
Its a very bad practice to send error state with 200 status code.
It's always a better idea to fail fast rather than hanging on a dead hope/system.
By the way talking about in the context of Site Reliability Engineering. Human life have other too much constraints to consider.
The journey of an HTTP request:
1. You type a URL
2. DNS finds the server
3. TCP handshake connects
4. Request flies across the internet
5. Server processes
6. Response races back
7. Browser renders
Milliseconds of magic, every single time.
There are multiple principles for writing great programs, these two are most fundamental and my favourite-
1. Write programs that do one thing and do it well.
2. Design programs to work together rather than in isolation.
which are your favorites?
#SoftwareEngineering
Writing better names:
A good name is:
- Consistent (easy to guess),
- Short (easy to type),
- Accurate (easy to understand).
- Independent of its type
Rule of thumb is that more the distance between its declaration and usage, more descriptive the name should be. #Coding