Learning from Giants #50
Load Balancing algorithms, the First Principles of Product Management, and Canva's Service-aligned Data Platform Architecture.
👋 Hi, this is Mathias with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.
Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. Read the archive for even more great content. Also: I share these articles daily on LinkedIn.
Load Balancing algorithms
Load balancers are everywhere.
When browsing the internet, your requests most likely hit a Load Balancer first. Yet, for many of us, LBs are a "set the default config and forget" thing. With low traffic, this has little impact.
As you scale, your chosen LB and request balancing algorithm significantly impact your overall quality of service. At this point, you should dig a little deeper on load balancing.
Depending on your load scenario, there are different metrics to look at:
Under heavy load, you want to serve as many customers as possible: look at dropped requests.
You want the best customer experience all the time: look at request latency, especially latency distribution and percentiles.
Then look at configuring your load balancer to optimize these metrics.
"Sending a request to each server in turn, is called "round robin" load balancing."
The simplest form. But there are many others, each with strengths and weaknesses.
📗 Sam Rose's Load Balancing post is a dynamically illustrated bottom-up introduction to load balancing algorithms and trade-offs. It's also described from the experimental point of view, which is crucial. Whatever you do, you should only trust one process: measure first, then optimize. Every system and every workload has different characteristics, so there is no silver bullet.
The First Principles of Product Management
"First principle thinking helps PMs because as companies scale, communicating the rationale behind historical, current, and future decisions can be simplified in a way that their team and stakeholders can rally around."
It can also help you as an individual to guide your own behavior and decisions — a personal framework.
"The first principles of Product Management can be reduced to:
A. Maximize impact to the mission.
B. Accomplish everything through others."
Left brain, right brain.
Impact maximization happens through your product strategy. It's your public digest of all the data you ingest as a person at the crossroads of everything.
“When PMs know the goal, understand the environment, and respect the constraints, they have the necessary inputs to build a great product strategy, which sits somewhere in the intersection of those inputs."
Execution happens through others.
Doer attitude is heavily rewarded because it often leads to a faster and stronger impact. But Brandon interestingly notes that it's not what makes PMs great.
"It makes you a good employee. Everyone — not just PMs - should aspire to have this mentality."
"PMs need strong self awareness to recognize when to lead, partner, or support their team."
📗
's "The First Principles of Product Management" defines these principles with simplicity and depth. It finishes on a "the Product Manager is a sports coach" analogy that is worth going through, full of very insightful statements.Service-aligned Data Platform Architecture at Canva
Like many, Canva has a data platform team maintaining the analytics stack. Their challenges are independent of Canva's business, so their shared learnings are precious.
"At the time of writing, we currently have over 5 Petabytes (5000 Terabytes) of data stored in Snowflake."
With rapid scale, they faced substantial scaling issues on their first-party (understand own databases) data extraction into the data warehouse.
The team initially went with the most straightforward approach: 24h-periodic full snapshot replication to S3, then Snowflake. But snapshot extraction was taking longer to run every day...
"We urgently needed a more efficient extraction process."
So they moved to a Change-Data-Capture architecture in which database changes are streamed into S3 before being ingested into the data warehouse.
"We use a publish-subscribe architecture for the delivery of records into a partitioned S3 bucket. [...] We also use Snowflake's Snowpipe to continuously ingest new data from an S3 bucket."
That solved their scaling challenge because only changed records were now streamed to the data warehouse instead of full snapshot replication.
With that setup done, the Canva team set on to their next challenge: moving to a "Service-aligned" architecture. Understand "service-team-owned" infrastructure as opposed to centralized shared infrastructure.
📗 Jaskirat Grover's Service-aligned Data Platform Architecture is a good blueprint for what a consistent data extraction architecture owned by individual service teams can look like. It also makes a lot of sense in the DBT world, where the service teams will be more relevant to own models than shared data platform teams lacking business context.