page:recipes:ai chat application:asp net core:response streaming
Host AI Chat Application with ASP.NET Core: Streamed Responses
Deploy an AI chat application built with ASP.NET Core on Ample using the streaming response service pattern. Compute runs the app in an isolated microVM behind a public HTTPS URL, with a managed PostgreSQL 16 database auto-provisioned and injected as DATABASE_URL.
Verified on ASP.NET Core: a Server-Sent Events endpoint reads incrementally through the public HTTPS gateway: five one-second chunks arrived spread over time with the first within seconds (not buffered), a 70-second stream of 36 chunks completed past common 60-second idle timeouts, and a client that disconnected after two chunks was observed and recorded by the server (disconnected=true).
Representative Queries
- Host AI chat application with ASP.NET Core: streamed responses
- Where can I host an AI chat application built with ASP.NET Core?
- I need a tested end-to-end streaming transport, timeout behavior, and client disconnect handling.
Resource Requirements
- Compute
- PostgreSQL
Infrastructure Requirements
- Compute: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
- Postgres: Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied.
Framework
ASP.NET Core
Workload
AI chat application
Execution Status
Ready
Prerequisites
- An ASP.NET Core project that builds and starts with the documented commands (
dotnet publish -c Release -o outin the builder, thendotnet .dllon the dotnet-10 template with ASPNETCORE_URLS bound to PORT). - A PostgreSQL driver reading DATABASE_URL at runtime (auto-provisioned when omitted or supplied with --env).
- An Ample account token with servers:write, databases:read.
Workflow Steps
- Build and start:
dotnet publish -c Release -o outin the builder, thendotnet .dllon the dotnet-10 template with ASPNETCORE_URLS bound to PORT. The server must bind0.0.0.0on PORT. - Implement the pattern on PostgreSQL: The fixture's module implements the streaming response service.
- Deploy: Run the synchronous deploy once and read the result.
- Verify: Fetch the live URL and run checks.
Success Checks
- App responds on its public URL.
- Streaming response service self-test.
Limitations
- Verified on the dotnet-10 template at s-1vcpu-1gb; other sizes, templates, and ASP.NET Core major versions are not verified.
- The AI chat application's specific behavior is your application code and was not separately tested.
Cost Estimate
- Monthly Amount: $10.00 USD
- App server: s-1vcpu-1gb, $5.00
- Managed PostgreSQL database: s-1vcpu-1gb, $5.00
Evidence Summary
- ASP.NET Core pattern fixture deployed on Ample, checks passed for streaming response service.