Skip to content

Conversation

@pandyamarut
Copy link
Contributor

@pandyamarut pandyamarut commented Aug 27, 2025

This PR introduces DeploymentRuntime, a new serverless runtime that enables deploying Python classes as both HTTP-accessible REST APIs and remote execution targets. Classes decorated with @Remote(type="LB") are automatically deployed as Load Balancer endpoints, making methods marked with @endpoint callable via curl/HTTP while
preserving traditional async remote execution for other methods.

@pandyamarut pandyamarut marked this pull request as ready for review September 4, 2025 19:37
@pandyamarut pandyamarut requested a review from deanq September 4, 2025 19:47
@pandyamarut pandyamarut requested a review from jhcipar September 16, 2025 04:31
Copy link

@jhcipar jhcipar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some comments - hopefully they're helpful/useful!


log.info(f"LoadBalancerSls initialized with endpoint: {self.endpoint_url}")

async def _get_session(self) -> aiohttp.ClientSession:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# LoadBalancerSls execution (Load Balancer mode)
@remote(
resource_config=my_resource_config,
type="LB",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the separate type attr if we're already detecting resources as load balancer sls resources?

LoadBalancerSls client for dual-capability remote execution.
Usage:
# After manually deploying LoadBalancerSls container
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we always initialize a LB from a manually deployed endpoint? is there a way we can deploy via Tetra, like with the queue-based sls endpoints? It would be nice for everything to happen in an IDE, but I also have not tried out LB usage so I'm not as familiar with potential limitations there!


# For now, use the hardcoded URL as requested
# TODO: Integrate with resource_config to get actual deployed endpoint URL
endpoint_url = "https://9ttr6h4l3f17w3.api.runpod.ai"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO here - just in case you're not aware!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the deployment part has been added in an another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants