This week’s system design refresher:
-
Stack overflow structure
-
iQIYI database choice timber
-
Latency Numbers Each Programmer Ought to Know for the 2020s
-
Row-based DB vs. Column-based DB
We’re speaking about HTAP Summit 2022, the very first in-person convention on Hybrid Transactional / Analytical Processing. This guarantees to be a disruptive expertise within the database world. So, dive in and uncover extra about this rising tech!
Hear from 30+ database trade leaders and builders from corporations and universities, resembling Amazon, Databricks, Forrester, Block, Pinterest, PingCAP, Vercel, UW-Madison, UC-Berkeley, and plenty of extra.
The Better part? It’s FREE.
Date: November 1 on the Pc Historical past Museum, Mountain View, Bay Space, CA.
HTAP Summit 2022 organized by PingCAP options 30+ content-rich periods on HTAP databases, together with core infrastructure applied sciences, use instances, greatest practices, ecosystem, hands-on workshops, and keynotes.
In case your reply is on-premise servers and monolith, you’d doubtless fail the interview, however that is how it’s inbuilt actuality!
What folks suppose it ought to appear like
The interviewer might be anticipating one thing on the left facet.
-
Microservice is used to decompose the system into small parts.
-
Every service has its personal database. Use cache closely.
-
The service is sharded.
-
The providers discuss to one another asynchronously by message queues.
-
The service is carried out utilizing Occasion Sourcing with CQRS.
-
Displaying off information in distributed methods resembling eventual consistency, CAP theorem, and so forth.
What it really is
Stack Overflow serves all of the site visitors with solely 9 on-premise net servers, and it’s on monolith! It has its personal servers and doesn’t run on the cloud.
That is opposite to all our in style beliefs lately.
One image is value a thousand phrases.
iQIYI is likely one of the largest on-line video websites on the earth, with over 500 million month-to-month energetic customers. Let us take a look at how they select relational and NoSQL databases.
The next databases are used at iQIYI:
-
MySQL
-
Redis
-
TiDB: a hybrid transactional/analytical processing (HTAP) distributed database
-
Couchbase: distributed multi-model NoSQL document-oriented database
-
TokuDB: open-source storage engine for MySQL and MariaDB.
-
Large knowledge analytical methods, like Hive and Impala
-
Different databases, like MongoDB, HiGraph, and TiKV
The database choice timber beneath clarify how they select a database.
This idea was initially offered by Jeff Dean. We up to date a few of these numbers to extra carefully mirror actuality within the 2020s. Absolute accuracy just isn’t the purpose. Growing an instinct of the relative variations is.
The diagram beneath reveals how knowledge is saved in column-based DB.
When to make use of
-
The desk is a large desk with many columns.
-
The queries and calculations are on a small variety of columns.
-
A variety of the columns include a number of distinct values.
Advantages of column-based DB
-
Greater knowledge compression charges.
-
Greater efficiency on OLAP features.
-
No want for added indexes
“Inform me a couple of time when…” Typically, the hardest interview questions aren’t the technical ones. For behavioral interviews, RocketBlocks is right here to assist. Trusted by main establishments like Stanford GSB and MIT Sloan.