Linux Foundation Intern'25 @CloudNativeFdn, Backend, golang, k8s. Deutsch lernen 🇩🇪

here
Joined November 2025
Fun fact: Redis, or any database. does not just stop when you hit `Ctrl+C` or when the OS decides to shut down. Databases need to handle termination with extreme care. This happens by trapping operating system signals like `SIGINT` and `SIGTERM` to ensure that active client commands finish executing and a final snapshot is safely persisted to disk before it says goodbye. Today, we dive into the source code of Redis to look at how production-grade databases implement graceful shutdown using signal handling. This is the 19th video in the Redis Internals series. Like always, we keep our focus on execution and not just theory, looking closely at how an open-source database coordinates with the operating system kernel to maintain data integrity and data consistency during its final moments. In the video, I talk about standard POSIX signals (`SIGINT`, `SIGTERM`, and even edge-case signals like `SIGSEGV`), how native processes trap these interrupts, and the critical problem of preventing abrupt connection termination We also dive directly into the Redis source code to see where it registers its signal handlers, and then we re-implement this exact graceful termination routine from scratch in Go. By the way, 19 videos are now live: 1. Why Single-Threaded Redis Is Fast 2. Writing a TCP Echo Server 3. Wire Protocols 4. Implementing RESP 5. Implementing PING 6. Understanding Event Loops 7. Implementing Event Loops 8. Implementing GET, SET, and TTL 9. Implementing DEL, EXPIRE, and Cleanup 10. Evictions and Implementing first-eviction 11. Implementing Command Pipelining 12. Implementing AOF Persistence 13. Objects, Encodings, and Implementing INCR 14. Implementing INFO and allkeys-random Eviction 15. The Approximated LRU Algorithm 16. Implementing the Approx LRU Algorithm 17. How Redis Caps Its Memory Usage 18. How and Why Redis Overrides Malloc 19. Graceful Shutdown using Signal Handling Hope this helps you better understand database internals and spark that engineering curiosity. Give it a watch.
21
30
2
689
40,791
Deep retweeted
we had an incident because we migrated traffic to a brand new s3 bucket. our millions of servers instantly crushed the new bucket’s partitions and started getting slammed with 5xx errors
9
14
5
311
106,039
Why you should use linked lists instead of matrix to store graphs? 1/n
18
12
1
102
10,512
Explains how the program loop and jump instructions work
4
98
3
983
32,453
Libraries That Quietly Revolutionized C
44
166
8
2,544
99,468
If you spin up 5 processes from the same executable, the code is loaded once and shared between all of them. The beauty of Virtual memory.
6
17
355
21,318
Hey @X algorithm I'm looking to #connect with the people who are interested in: - Backend - Full stack - DevOps - Leetcode - Freelancing - Startup - AI
254
9
3
367
17,567
The award for most useless and non-informative page goes to the GitHub dashboard
2
1
6
432
SIM cards are basically tiny virtual machines running Java
8
2
2
10
4,109
Why do people still praise WinRAR like it’s premium tech? ZIP and GZIP are literally free, open standards backed by open source xitter.cf/AAAAA4A4AAAAA/status/1…
1
1
3
510
excuse me who the FUCK asked your ass????
32
15
2
1,309
84,514
Startup idea: trees growing RAM
11
1
1
28
1,054
Can you write 100 lines of code without using AI?
471
12
23
484
76,551
wild c feature none of you knew about
326
364
129
9,480
698,208
SYSTEM DESIGN PHASE 0 PART-3 DAY-4: REST API, GRAPHQL, gRPC: I think almost everyone knows what is api so i would just skip introducing what is api and how does it works we will only look for how much diffrent type of apis works. REST-API: Well it stands for Representational state transfer or sum shit idc just focus on practicals. Widely used in most of the basic CRUD apps, like a todo and all. Rest api is a go to for every developer who wants to build backends as a beginner and so on. Problems with Rest - Rest apis are overfetches means it returns data we dont even need. for example You want a PFP+Comments of a user right? You called your serevr with this request user/profile/121 for pfp and for comments user/comments/121 This will return stupid data with it which you dont even need like createdAT, updatedAT, ID, and all the metadata. GraphQL: This is the type of API which solves the problems of underfetching and overfetching, basically returns the data you only need. it doesnt even need multiple endpoints like rest to return the data. it has a single endpoint which returns the data you defined. Thats all. GraphQL is basically is a part of META internally developed by meta for facebooks and later in 2012 they made it public. Caching is hard in graphQL and there are performance issues aswell. gRPC by Google - This is high performance service to service communcation developed by google, this type of communcation is best for microservices communication. It is mostly like writing a function on another server. Strongly typed, binary, extremely fast. How does this works? Grpc just called the method above and directs to the server Client calls a method, Data serialized using Protobuf - HTTP/2 transport - Server responds with binary data. This is extremely fast and stable. Tradeoffs? yea there is hard to maintain and debug and its not browser friendly at all. Why to even use it? because its fast and poweful replaces rest api in many cases like small typing, streaming support , small payloads. This was the whole post about REST , gRpc and GraphQL in System Design. I hope you like it and yeah the post is smaller because if writing goes in depth there would be a only post about a particular api. I hope you understand. Thanks for reading :)
12
8
2
50
3,541
SYSTEM DESIGN PHASE 0 PART-3 DAY-3: Networking Fundamentals: Why Networking Is Imporant in System Design: Networking is a foundational element of system design because it provides the communication backbone that connects different components of a system. whether they are in the same physical location or globally distributed. A well designed network is crucial for ensuring the system's performance, reliability, scalability, and security. There are two main protocols which are widely used in the world and are basically backbone of the internet. TCP and UDP TCP stands for Transimission Control Protocol and UDP stands for User Datagram Protocol. Before HTTP, Everything rides on transport protocols. TCP: TCP protocol is reliable but slower because of three way handshake SYN-SYN_ACK-ACK. But this protocol gurantees data arrives in order , lost packets are retransmitted and data arrives only once. Basically TCP is more reliable. mostly used for APIs payments, logins and file transfers. UDP: UDP protocol is fast af but it is unreliable. it doesnt guarantees reliability, packets may drop, order not guarantees. This protocol is mainly used for online live vide streaming, video calls and real time communications like WEBRTC. Basically UDP is fast and being fast doesnt guarantees reliability , losing a frame is OK but waiting for retransmission is NOT. Basically TCP prioritizes correctness and UDP prioritizes speed. Why HTTP (Hypertext transfer protocol) exists? TCP only moves bytes and http defines meaning like what the type of data is and what is its intent. Like it tells you status codes , headers, methods like GET,PUT,POST,DELETE. Now lets move forward towards HTTP 1.1, its is simple but slow because it allows only one request per connection. Problem ? if request 1 is slower reques 2 waits. For example browser loading HTML, CSS, JS ,Images each request block others. resullts in high latency. HTTP/2 changed everything allowing multiple requests are sent parallely it involved multiplexing. Why multiplexing matters means it allows multiple reuqest to be sent in parallel, not sequentially. Results? Faster page loads, fewer tcp connections, lower latency. But it still suffers from TCP head of line blocking if one packet is lost all streams wait. HTTP/3 built on UDP (QUIC) it uses QUIC which runs on over UDP, Why QUIC? tcp's reliability is great, but for modern internet needs QUIC provides encryption, faster handshakes, no tcp head of line blocking, independent streams. benefit is that packet loss in one stream doesnt even affect others. it makes page loads faster, better mobile performance on poor or weak networks and its ideal for global systems, used by google, netflix,meta etc. In Real Engineering HTTP/1.1 is legacy. HTTP/2 for modern REST and GRPC. TCP based correctness matters. Real Time Systems UDP WebRTC Custom protocols Global Scale Platforms HTTP/3 CDN + QUIC Edge computing HTTP/1.1 is simple but slow, HTTP/2 fixes parallelism, and HTTP/3 fixes latency by ditching TCP’s limitations using QUIC over UDP. In the next post ill cover about DNS, CDNs, Anycast, REST,GRPC and GraphQL Thanks for reading this post and thank you for your time, repost it it will help a lot reaching and increasing the audience :)
14
12
1
42
2,776
Deep retweeted
Whose face comes to your mind first when you hear the word 'AI'?
3
1
6
256
Deep retweeted
Finally got verified! If our skills align, i would love to connect
227
7
1
284
11,302
Lets learn about the core fundamentals of Backend Engineering About Authentication and Authorizations. Many of you learned about JWT tokens which is used to implement user authentication and authorisation system. Most of you have never heard about JOSE JSON Object Signing and Encryption before moving into it. Lets what problem it solves. The Problem before JOSE: THe apis and microservices needed a standard way to: Sign data → to verify who sent it Encrypt data → so only the intended receiver can read it Represent claims (user info, metadata) in a compact, URL-safe format Use modern cryptography (RSA, EC, AES, etc.) Transmit tokens across HTTP, URLs, cookies without breaking formatting Before JOSE, developers used custom token formats, mixed crypto libraries, and every system implemented signing/encryption differently → this created: No standard format Interoperability issues Difficult key management Confusing signature/wrapping conventions So now we know the problem lets see what JOSE is: JOSE is a complete package full family of RFCs that define how to securely sign, encrypt, exchange keys, and represent tokens. JOSE Has JWE,JWS,JWT,JWK, JWA: JWS: JSON Web Signature,Standard for signing any payload (not only JWTs). JWE : JSON Web Encryption,Standard for encrypting any payload. JWK :JSON Web Key,Standard way to represent public/private keys in JSON. JWA :JSON Web Algorithms,Defines supported algorithms (RSA, EC, AES, HMAC). JOSE provides a unified, interoperable cryptographic ecosystem by standardizing how data is signed through JWS, encrypted through JWE, and how keys are represented through JWK ensuring secure, consistent, cross language signing, encryption, and verification across systems like Python, Node, Java, and .NET. So basically with JOSE you dont have to do custom token formats and mixed crypto libraries across services it makes the one standarlized way so that i can be used any where without any mess. Thanks for reading :) And share if you liked this short summary of JOSE
12
14
1
55
6,707
Life without premium... Brutal world 😫
55
2
1
79
3,538