microsoft / microsoft/aspire-samples

Example: Http/Grpc Api Versioning 1️⃣2️⃣3️⃣

Open
#93 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-samples
Dominant language
C#
Stars
1.2k
Forks
345
Avg merge
3d 13h
Merged PRs (30d)
30

Description

Since api versioning is a best practice in a microservice architecture. I think showing an example with http and grpc with two different versions and having them two client services that utilize different versions of the api's would be beneficial for versioning guidance.

graph LR
    subgraph Web UI 1
    A[Web UI 1]
    end

    subgraph Web UI 2
    B[Web UI 2]
    end

    subgraph gRPC Applications
    GRPC1[gRPC App V1]
    GRPC2[gRPC App V2]
    end

    subgraph HTTP Applications
    HTTP1[HTTP App V2]
    HTTP2[HTTP App V3]
    end

    A -->|communicates with| GRPC1
    A -->|communicates with| HTTP1
    B -->|communicates with| GRPC2
    B -->|communicates with| HTTP2

We can also utilize an api gateway to have it automatically redirect from v1 of http api to v2 for a more comprehensive example.

graph LR
    subgraph Web UI 1
    A[Web UI 1]
    end

    subgraph Web UI 2
    B[Web UI 2]
    end

    subgraph API Gateway
    AG[API Gateway]
    end

    subgraph gRPC Applications
    GRPC1[gRPC App V1]
    GRPC2[gRPC App V2]
    end

    subgraph HTTP Applications
    HTTP1[HTTP App V2]
    HTTP2[HTTP App V3]
    end

    A -->|communicates with| AG
    B -->|communicates with| AG
    AG -->|to| GRPC1
    AG -->|to| HTTP1
    AG -->|to| GRPC2
    AG -->|to| HTTP2


Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Review the repository's sample structure, then define a bounded example covering versioned HTTP and gRPC APIs with two clients; done should include the requested versioned interactions and, only if in scope, the API gateway routing scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.