Recall & Review
beginner
What is a REST API in the context of microservices?
A REST API is a way for microservices to communicate over the internet using simple HTTP methods like GET, POST, PUT, and DELETE. It uses URLs to access resources and exchanges data usually in JSON format.
Click to reveal answer
intermediate
Why use REST APIs between microservices instead of direct database access?
REST APIs provide a clear boundary between services, allowing each to manage its own data and logic. This reduces tight coupling, improves security, and makes the system easier to maintain and scale.
Click to reveal answer
beginner
What HTTP methods are commonly used in REST APIs and what do they represent?
Common HTTP methods are GET (read data), POST (create data), PUT (update data), and DELETE (remove data). These map to basic actions on resources in REST APIs.
Click to reveal answer
intermediate
How does statelessness in REST APIs help microservices?
Statelessness means each request from a client to a service contains all information needed to understand and process it. This makes services easier to scale and recover because they don't rely on stored session data.
Click to reveal answer
advanced
What are some common challenges when designing REST APIs between microservices?
Challenges include handling network failures, versioning APIs without breaking clients, securing communication, managing data consistency, and ensuring good performance under load.
Click to reveal answer
Which HTTP method is typically used to update an existing resource in a REST API?
✗ Incorrect
PUT is used to update an existing resource or create it if it does not exist.
What does it mean that REST APIs are stateless?
✗ Incorrect
Stateless means the server does not store client context between requests.
Why is using REST APIs better than direct database access between microservices?
✗ Incorrect
REST APIs help keep services independent and easier to manage.
Which data format is most commonly used to exchange data in REST APIs?
✗ Incorrect
JSON is lightweight and easy to use, making it the most common format.
What is a common way to handle different versions of a REST API?
✗ Incorrect
Versioning in URLs or headers allows clients to choose which API version to use.
Explain how REST APIs enable communication between microservices and why statelessness is important.
Think about how each request carries all needed info and how services talk over HTTP.
You got /5 concepts.
Describe common challenges when designing REST APIs for microservices and how to address them.
Consider what can go wrong when services talk and how to keep them working smoothly.
You got /5 concepts.