Sistem Design Flashcards
Content Delivery Networks (CDNs):
Cloudflare, Google Cloud CDN, Amazon CloudFront, and Microsoft Azure CDN
CDNs are networks of servers spread across multiple locations to store and serve web content like images and videos. They store cached copies of your content across multiple geographical locations.
API design serves as the contract between the client and the server. Here are key considerations when designing an API:
Type of API: When designing an API, first decide on the type: RESTful, GraphQL, or gRPC.
Communication Protocol: HTTP, WebSockets, etc.
Data Transport Mechanism: JSON, XML, or Protocol Buffers.
Security: Consider implementing measures against Dictionary Attacks, XSS, CSRF, HPP Attacks, and use Rate Limiting.
Querying and Sorting: How will the data be retrieved and sorted?
Pagination: You don’t wanna get all data in one request, you need to paginate.
Performance: Optimize the initial loading time of your app.
Error Handling: Make sure errors are consistent and informative.