Facing a system design interview soon? I found so much value in doing hypothetical designs that decided to create my own guide on how to build your own roleplay CTO-designer system design process. All that said, I actually enjoyed every system design interview I have had. There is something very satisfying about figuring out a solution on paper and then seeing it work ‘in-game’. This guide is completely free, and if you’re looking for any tips or help with coding interviews, definitely check it out!
Disclaimer: All of this analysis is speculative I have no affiliation to Riot Games.
Design a backend system architecture for 50 Million daily league of legends players. …
I thought it would be fun to write about Python’s value-or operator (sometimes affectionately known as the “walrus operator”) because it brings a lot of more expressive syntax and what the heck moments
It is possible to combine value-or (less preferable called walrus) operator with
or expression which illustrated in this example
This works because ok := len(a) evaluates as a True so it’s possible to stack more expressions after `and` operator.
Likewise you can create even more complex expressions with reference to
Significant problem in any analytics platform is that volume and type of data is ever changing. The data can be complex and incomparable. In analytics terms, high degree of data variance is a persistent problem. Analytics system must be flexible in order to integrate and derive value from new variations in the data.
Simply, We needed to have an Architecture for Data lake. This architecture decouples data ingestion from serving consumption.
Analytics systems would be facing challenges here as they need to handle high velocity, high variety, and high volume of data. …
Proxy services are like a translator between microservices. A service mesh provides a logically consistent way to handle service interactions.
A lot has been written about service mesh, in a way we already have them — they are proxy services. Think of every tool that is used to connect to services as a proxy, i.e. application gateway, ELBs and now Istio. A service mesh provides a logically consistent way of handling service interactions which have historically been very difficult to tackle.Many companies are building complex distributed systems with microservices, and the trend is growing. …
1GB file is generated every 24 hours on one of the machines inside Google data center. This file needs to be copied only once to all the machines across all the data centers. Design this system.
Google has millions of machines and data centers across the globe. Thus, it is impossible to use this machine as a single centralized point of file sharing. The goal is to design a system architecture and flow that can handle these huge files. Design interviews test your ability to analyze and solve big problems, quickly. …
This tiny helper method `cache_info` from the decorator function can help you troubleshoot and debug caching function stats on each call.
for n in 8, 290, 308, 320, 8, 218, 320, 279, 289, 320, 9991:
pep = get_pep(n)
CacheInfo(hits=3, misses=8, maxsize=32, currsize=8)
I remember writing a cacheing bug a few years back where I had to use a lru cache decorator for some of the larger functions deployed to AWS lambda. The issue was that cache needs to be invalidated over time and there is no built in argument for that in python’s `lru_cache`. …