API
The door a program offers to others: which requests it accepts and what it answers, without showing how it works inside.
Example
GET /users/42 on the users API returns user 42's name and email.
Test yourself: API
REST APIs
What is an API?
You ask GET /users/42 and the contract says user 42's name and email come back.
GraphQL and gRPC
GraphQL is always better than REST.
For 1 public API with lots of caching, REST usually wins; GraphQL shines in 1 app asking for varied data.
The design steps
Which is a good API definition for the interview?
1 line with 2 parameters and 1 return type: enough.
0/3
â–¶ PlayLessons that use it
DNS records
Each domain's instructions
Kinds of load balancers
Not all load balancers are alike
Evicting and spreading the cache
The cache fills up
Microservices done right
Microservices without traps
API Gateway
1 single front door
REST APIs
Resources and verbs
GraphQL and gRPC
Other ways to talk to an API
Rate limiting
A cap on requests
OAuth 2.0 and OpenID Connect
Grant access without giving the password
Single Sign-On
One login for everything
The design steps
From data to bottlenecks
Designing a URL shortener
A long link in 7 characters
