Developer Guideline
  • Home
  • 🧠Must you know
    • Algorithm
    • Architecture
      • API
    • Comparison
      • ID Token vs Access Token
      • Lazy Loading vs Eager Loading
      • Morphs vs Foreign Key
      • UUID vs ULID
      • GraphQL vs REST
      • Cache vs CDN
      • Concurrency vs Parallelism
      • Null vs Not Null
    • Diagram
      • CI/CD Pipeline
      • High Performance Culture
  • ☂ïļLaravel
    • Template
      • Template System Check in Route on Laravel
      • Template Function in FormController on Laravel
      • Template Route call FormController on Laravel
      • Template Route Prefix Name on Laravel
      • Template Basic and Custom Pagination on Laravel
      • Template PHP Artisan Command
      • Template Route for App Environment
    • Feature
      • Data Type
      • Mailables
      • Rules
    • Package
    • Document
  • ðŸŦ–Collaboration Agreement
    • Naming Convention
      • Naming Convention for Git Branch
      • Naming Convention for Environment Variable
    • Rule
      • Rule of Commit Message
      • Semantic Versioning
  • ðŸĶĢProject Manager
    • Requirements
      • System Requirements
      • Technical Requirements
      • Functional Requirements
Powered by GitBook
On this page
  • ðŸĶ  API Architecture
  • ðŸĶ§ API Request Method
  • ðŸĶ‘ API Health Check
  1. Must you know
  2. Architecture

API

ðŸĶ  API Architecture

API Architecture
Description

SOAP

A protocol for exchanging structured information in web services. It uses XML for message formatting and relies on HTTP, SMTP, or other transport protocols. Known for its strict standards and strong typing.

RESTful

An architectural style for designing networked applications. Uses standard HTTP methods (GET, POST, PUT, DELETE) for communication and relies on stateless, client-server communication. Often uses JSON for data representation.

GraphQL

A query language and runtime for APIs that allows clients to request only the data they need. Provides a more flexible and efficient alternative to traditional REST APIs by enabling clients to define the structure of the response.

gRPC

An open-source framework developed by Google that uses HTTP/2 for transport and Protocol Buffers for serialization. Enables efficient communication between services with features like bidirectional streaming and multiplexing.

WebSocket

A communication protocol that provides full-duplex communication channels over a single, long-lived connection. Often used for real-time applications where low-latency communication is crucial.

Webhook

A mechanism that allows one system to notify another system about events. Instead of a system polling for updates, the webhook model involves the target system sending HTTP requests to a specified callback URL when an event occurs.

MQTT

A lightweight, open, and efficient messaging protocol designed for low-bandwidth, high-latency, or unreliable networks. Commonly used in IoT (Internet of Things) scenarios.

OData

A standard protocol for building and consuming RESTful APIs. Aims to simplify data sharing between applications and supports CRUD (Create, Read, Update, Delete) operations.

JSON-RPC

A remote procedure call (RPC) protocol encoded in JSON. Allows for the execution of functions on a remote server and is a lightweight alternative to XML-RPC.

XML-RPC

A remote procedure call (RPC) protocol that uses XML to encode messages. Enables the execution of functions on a remote server and is a predecessor to JSON-RPC.

SOAP : āđ€āļŦāļĄāļēāļ°āļāļąāļš Enterprise

RESTful : āđ€āļŦāļĄāļēāļ°āļāļąāļš Web āļŦāļĢāļ·āļ­ Mobile Server

GraphQL : āļĨāļ” Network Load

gRPC : āļŠāļģāļŦāļĢāļąāļš Microservice āļ„āļļāļĒāļāļąāļ™

Websocket : āļŠāļģāļŦāļĢāļąāļš Client āļāļąāļš Server āļ„āļļāļĒāļāļąāļ™ āļŠāļ·āđˆāļ­āļŠāļēāļĢāđāļšāļšāļŠāļ­āļ‡āļ—āļēāļ‡

Webhook : āđāļˆāđ‰āļ‡āđ€āļ•āļ·āļ­āļ™āđ€āļĄāļ·āđˆāļ­āļĄāļĩāđ€āļŦāļ•āļļāļāļēāļĢāļ“āđŒ

MQTT : āļŠāļģāļŦāļĢāļąāļš IoT āļŦāļĢāļ·āļ­āđ€āļ„āļĢāļ·āļ­āļ‚āđˆāļēāļĒāļ—āļĩāđˆāđ„āļĄāđˆāđ€āļŠāļ–āļĩāļĒāļĢ

OData : āļŠāļģāļŦāļĢāļąāļšāļāļēāļĢāđāļŠāļĢāđŒāļ‚āđ‰āļ­āļĄāļđāļĨāđƒāļ™ RESTful APIs

JSON-RPC : āļāļēāļĢāđ€āļĢāļĩāļĒāļāđƒāļŠāđ‰āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āļĢāļ°āļĒāļ°āđ„āļāļĨāđāļšāļš JSON

XML-RPC : āļāļēāļĢāđ€āļĢāļĩāļĒāļāđƒāļŠāđ‰āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āļĢāļ°āļĒāļ°āđ„āļāļĨāđāļšāļš XML

ðŸĶ§ API Request Method

HTTP Method
Description

GET

Retrieve data from a specified resource.

POST

Submit data to be processed to a specified resource.

PUT

Update a resource or create it if it doesn't exist.

PATCH

Partially update a resource.

DELETE

Delete a specified resource.

OPTIONS

Get information about the communication options for a resource.

HEAD

Retrieve headers of a resource without the body.

ðŸĶ‘ API Health Check

Method/Tool

HTTP Status Codes

Examines the HTTP status code returned by the API to determine if it's functioning correctly.

Heartbeat Endpoints

Dedicated endpoints designed to return a simple response confirming that the API is operational.

Ping Endpoints

Simple routes that respond with minimal data to serve as a lightweight health check.

Response Time Monitoring

Monitors the response time of API requests as an indirect measure of API health.

Circuit Breakers

Mechanisms that temporarily block access to the API if the failure rate exceeds a threshold.

Load Balancer Health Checks

Load balancers perform regular health checks on each API instance and route traffic accordingly.

Synthetic Transactions

Automated tests that simulate user interactions with the API to ensure its functionality.

Third-party Monitoring

Services like Pingdom, New Relic, and others provide tools for API health checks and monitoring.

Logging and Error Monitoring

Monitoring logs and tracking errors can help identify potential issues with the API's functionality.

Distributed Tracing

Tracing systems like Jaeger or Zipkin trace API requests across services to identify bottlenecks.

HTTP Status Codes : āļ•āļĢāļ§āļˆāļŠāļ­āļšāļŠāļ–āļēāļ™āļ° HTTP āļ—āļĩāđˆ API āļŠāđˆāļ‡āļāļĨāļąāļšāļĄāļē āđ€āļžāļ·āđˆāļ­āļ”āļđāļ§āđˆāļē API āļĒāļąāļ‡āļ—āļģāļ‡āļēāļ™āļ›āļāļ•āļīāļŦāļĢāļ·āļ­āđ„āļĄāđˆ

Heartbeat Endpoints : āļ•āļĢāļ§āļˆāļŠāļ­āļšāļāļēāļĢāļ•āļ­āļšāļāļĨāļąāļšāđāļšāļšāļ‡āđˆāļēāļĒāđ† āđ€āļžāļ·āđˆāļ­āļĒāļ·āļ™āļĒāļąāļ™āļ§āđˆāļē API āļĒāļąāļ‡āļ—āļģāļ‡āļēāļ™āļ­āļĒāļđāđˆ

Ping Endpoints : āđ€āļŠāđ‰āļ™āļ—āļēāļ‡āļ‡āđˆāļēāļĒāđ† āļ—āļĩāđˆāļ•āļ­āļšāļāļĨāļąāļšāļ”āđ‰āļ§āļĒāļ‚āđ‰āļ­āļĄāļđāļĨāļ™āđ‰āļ­āļĒāļ—āļĩāđˆāļŠāļļāļ” āđ€āļžāļ·āđˆāļ­āđƒāļŠāđ‰āđƒāļ™āļāļēāļĢāļ•āļĢāļ§āļˆāļŠāļ­āļšāļŠāļļāļ‚āļ āļēāļžāļ‚āļ­āļ‡ API

Response Time Monitoring : āļ•āļĢāļ§āļˆāļŠāļ­āļšāđ€āļ§āļĨāļēāļāļēāļĢāļ•āļ­āļšāļŠāļ™āļ­āļ‡āļ‚āļ­āļ‡āļāļēāļĢāđ€āļĢāļĩāļĒāļāđƒāļŠāđ‰ API

Circuit Breakers : āļ›āļīāļ”āļāļąāđ‰āļ™āļāļēāļĢāđ€āļ‚āđ‰āļēāļ–āļķāļ‡ API āļŠāļąāđˆāļ§āļ„āļĢāļēāļ§āļŦāļēāļāļ­āļąāļ•āļĢāļēāļāļēāļĢāļĨāđ‰āļĄāđ€āļŦāļĨāļ§āđ€āļāļīāļ™āđ€āļāļ“āļ‘āđŒāļ—āļĩāđˆāļāļģāļŦāļ™āļ”āđ„āļ§āđ‰

Load Balancer Health Checks : āļ•āļąāļ§āļšāļēāļĨāļēāļ™āļ‹āđŒāđ‚āļŦāļĨāļ”āļˆāļ°āļ—āļģāļāļēāļĢāļ•āļĢāļ§āļˆāļŠāļ­āļšāļŠāļļāļ‚āļ āļēāļžāļ‚āļ­āļ‡āđāļ•āđˆāļĨāļ° API instance āļ­āļĒāđˆāļēāļ‡āļŠāļĄāđˆāļģāđ€āļŠāļĄāļ­ āđāļĨāļ°āļāļģāļŦāļ™āļ”āđ€āļŠāđ‰āļ™āļ—āļēāļ‡āļ‚āļ­āļ‡āļāļēāļĢāļˆāļĢāļēāļˆāļĢāļ•āļēāļĄāļ™āļąāđ‰āļ™

Synthetic Transactions : āļāļēāļĢāļ—āļ”āļŠāļ­āļšāļ­āļąāļ•āđ‚āļ™āļĄāļąāļ•āļīāļ—āļĩāđˆāļˆāļģāļĨāļ­āļ‡āļāļēāļĢāđ‚āļ•āđ‰āļ•āļ­āļšāļ‚āļ­āļ‡āļœāļđāđ‰āđƒāļŠāđ‰āļāļąāļš API

Third-party Monitoring : āļšāļĢāļīāļāļēāļĢāļˆāļēāļāļ āļēāļĒāļ™āļ­āļ āļŠāļģāļŦāļĢāļąāļšāļāļēāļĢāļ•āļĢāļ§āļˆāļŠāļ­āļšāđāļĨāļ°āļāļēāļĢāđ€āļāđ‰āļēāļ•āļīāļ”āļ•āļēāļĄ

Logging and Error Monitoring : āļāļēāļĢāļ•āļĢāļ§āļˆāļŠāļ­āļšāļšāļąāļ™āļ—āļķāļāđāļĨāļ°āļāļēāļĢāļ•āļīāļ”āļ•āļēāļĄāļ‚āđ‰āļ­āļœāļīāļ”āļžāļĨāļēāļ”

Distributed Tracing : āļĢāļ°āļšāļšāļāļēāļĢāļ•āļīāļ”āļ•āļēāļĄāđ€āļŠāđˆāļ™ Jaeger āļŦāļĢāļ·āļ­ Zipkin āļˆāļ°āļ•āļīāļ”āļ•āļēāļĄāļāļēāļĢāđ€āļĢāļĩāļĒāļāđƒāļŠāđ‰ API āļ‚āđ‰āļēāļĄāļšāļĢāļīāļāļēāļĢāđ€āļžāļ·āđˆāļ­āļ•āļĢāļ§āļˆāļŦāļēāļ„āļ­āļ‚āļ§āļ”

PreviousArchitectureNextComparison

Last updated 9 months ago

ðŸ§