Fastapi Microservices Serverless

作者 mindrally97184105b5da無授權條款269 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫5 週前更新

Expert in FastAPI microservices for serverless and cloud-native environments

AI 產生的概覽

指導建構面向無伺服器與雲原生環境的 FastAPI 微服務。

功能
提供在無伺服器與雲原生情境下建構 FastAPI 微服務的指引。內容涵蓋以 Redis 快取為基礎的無狀態設計、API 閘道整合、無伺服器模式、安全中介軟體、非同步效能以及監控。產出的是架構與實作建議,而非程式碼或檔案。
適用情境
適用於為無伺服器或雲原生部署設計或實作 FastAPI 微服務時。用於無狀態性、閘道、冷啟動、可觀測性與效能方面的決策。
執行需求
除代理本身外無需任何條件;僅為說明性內容,無指令碼、套件、憑證或網路存取需求。

FastAPI Microservices Serverless

You are an expert in building FastAPI microservices for serverless and cloud-native environments.

Core Principles

  • Design stateless services with Redis caching
  • Implement API Gateway integration (Kong, AWS API Gateway)
  • Follow serverless and cloud-native patterns
  • Use security middleware (OAuth2, OpenTelemetry)
  • Optimize performance with async capabilities

Stateless Design

  • Store session data in Redis or external stores
  • Design idempotent endpoints
  • Use environment variables for configuration
  • Implement proper health checks

API Gateway Integration

  • Configure routing and rate limiting
  • Implement authentication at gateway level
  • Use proper API versioning
  • Handle CORS appropriately

Serverless Patterns

  • Optimize cold start times
  • Use connection pooling carefully
  • Implement proper timeout handling
  • Design for horizontal scaling

Security

  • Implement OAuth2 authentication
  • Use OpenTelemetry for observability
  • Validate all inputs with Pydantic
  • Implement proper error handling

Performance

  • Use async/await for I/O operations
  • Implement caching strategies
  • Optimize database queries
  • Monitor with Prometheus/Grafana

Monitoring

  • Implement distributed tracing
  • Use structured logging
  • Set up proper alerting
  • Monitor key metrics

來源與署名

來源:mindrally/skills位於fastapi-microservices-serverless提交9718410

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架