system design- algo

本文主要讨论了AlgoExpert平台的核心用户流程设计,包括用户访问网站、查看问题、标记完成、编写和运行代码等。目标是为全球用户提供响应迅速的服务,重点关注美国和印度市场。内容更新频繁,系统可用性要求为2到3个9。文章涵盖了系统需求收集、规划、静态UI内容、主要集群和负载均衡、静态API内容、缓存、访问控制、用户数据存储、存储性能、跨区域复制、代码执行和系统架构图等方面。
摘要由CSDN通过智能技术生成

Design AlgoExpert
在这里插入图片描述
在这里插入图片描述

Many systems design questions are intentionally left very vague and are literally given in the form of Design Foobar. It’s your job to ask clarifying questions to better understand the system that you have to build.

We’ve laid out some of these questions below; their answers should give you some guidance on the problem. Before looking at them, we encourage you to take few minutes to think about what questions you’d ask in a real interview.

Question 1

Q: Are we designing the entire AlgoExpert platform or just a specific part of it, like the coding workspace?

A: Since we only have about 45 minutes, you should just design the core user flow of the AlgoExpert platform. The core user flow includes users landing on the home page of the website, going to the questions list, marking questions as complete or in progress, and then writing and running code in various languages for each language. Don’t worry about payments or authentication; you can just assume that you have these services working already (by the way, we mainly rely on third-party services here, like Stripe, PayPal, and OAuth2).

Question 2

Q: AlgoExpert doesn’t seem like a system of utmost criticality (like a hospital system or airplane software); are we okay with 2 to 3 nines of availability for the system?

A: Yes, this seems fine–no need to focus too much on making the system highly available.

Question 3

Q: How many customers should we be building this for? Is AlgoExpert’s audience global or limited to one country?

A: AlgoExpert’s website receives hundreds of thousands of users every month, and tens of thousands of users may be on the website at any point in time. We want the website to feel very responsive to people everywhere in the world, and the U.S. and India are the platform’s top 2 markets that we especially want to cater to.

Question 4

Q: Does AlgoExpert make changes to its content (questions list and question solutions) often?

A: Yes–every couple of days on average. And we like to have our changes reflected in production globallywithin the hour.

Question 5

Q: How much of the code-execution engine behind the coding workspace should we be designing? Do we have to worry about the security aspect of running random user code on our servers?

A: You can disregard the security aspects of the code-execution engine and just focus on its core functionality–the ability to run code in various languages at any given time with acceptable latency.

Question 6

Q: While we’ll care about latency across the entire system, the code-execution engine seems like the place where we’ll care about it most, since it’s very interactive, and it also seems like the toughest part of our system to support low latencies; are we okay with anywhere between 1 and 3 seconds for the average run-code latency?

A: Yes–this seems reasonable a

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值