0
0
Microservicessystem_design~5 mins

REST API between services in Microservices - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AGET
BPOST
CPUT
DDELETE
What does it mean that REST APIs are stateless?
AEach request contains all information needed to process it
BThey keep connections open permanently
CThey require cookies to work
DThey store user sessions on the server
Why is using REST APIs better than direct database access between microservices?
AREST APIs are slower but easier to hack
BREST APIs create tight coupling between services
CDirect database access is more secure
DREST APIs provide clear boundaries and improve maintainability
Which data format is most commonly used to exchange data in REST APIs?
AJSON
BCSV
CXML
DYAML
What is a common way to handle different versions of a REST API?
AChange the API without notice
BUse version numbers in the URL or headers
COnly support one version forever
DUse different HTTP methods for versions
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.