Skip to content

Multiple endpoints roadmapΒ #492

@aniketmaurya

Description

@aniketmaurya

πŸš€ Support for Multiple Endpoints in LitServe

We are introducing support for multiple endpoints in LitServe, which will require minor architectural adjustments to better separate concerns between the core components.

✨ Proposed Usage

Here’s an example of what the new API could look like:

api1 = VisionEncoderAPI(batch_size=4, api_path="/ap1")
api2 = TextEncoderAPI(batch_size=8, api_path="/path2)

def resize(...):
   ...

server = LitServer([
  api1,
  api2,
  {"/random": resize}
])
server.run()

πŸ” Design Goals

To cleanly support this functionality, we need to ensure that responsibilities are clearly divided between the two main entities:

LitAPI

  • Manages properties that pertain to the logic of individual APIs, such as:
    • batch_size
    • loop
    • stream
    • api_path

LitServer

  • Handles server-level configuration, such as:
    • Endpoint routing

Shared Responsibility (LitAPI + LitServer)

  • Callback handling
  • Streaming functionality

πŸ“Œ Action Items

In PR #468, we successfully moved the batch_size parameter from LitServer to LitAPI to align with this separation of concerns. We need to apply a similar refactoring for other attributes:

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions