본문으로 바로가기

Rest? gRPC? GraphQL?

category software engineering/backend 2022. 8. 31. 14:56
728x90
  • Use REST if:
    1. You’re building a CRUD-style web application.
    2. Your API is mostly manipulating well-structured related data.
    3. Your API needs to be highly cacheable, including support for intermediate proxy caching.
  • Use gRPC if:
    1. Your API is private and powers communications between parts of a microservices architecture.
    2. Your API is mostly about actions.
    3. You need to collect data from IoT devices.
    4. You’re implementing a Backend For Frontend pattern for a mobile application with stable API request patterns.
    5. Performance is a critical requirement.
  • Use GraphQL if:
    1. You’re building a public API and you want it to be highly flexible in terms of customizing requests.
    2. You want to defer defining your API surface until you have a chance to analyze which resources your clients tend to request.
    3. You want to aggregate internal data from multiple sources into a public API for multiple clients with varying data requirements.

https://speedscale.com/choosing-an-api-technology-grpc-rest-graphql/

'software engineering > backend' 카테고리의 다른 글

MongoDB - 집계  (0) 2023.06.18
Locking - Optimistic concurrency control (OCC)  (0) 2022.08.31
ElasticSearch  (0) 2022.08.29
DynamoDB  (0) 2022.08.29
Query on S3 ( Athena, Redshift )  (0) 2022.08.29