A Truefoundry Service represents a continuously running application that typically provides a set of APIs for interaction. Services can be dynamically scaled based on incoming traffic or resource demands.
Services are perfect for scenarios where real-time responses are essential, such as:
- Hosting Real-time Model Inference (e.g., Flask, FastAPI)
- Fueling Dynamic Website Backends
- Creating Model Demos (e.g., Streamlit, Gradio)
When deploying a service, you'll typically expose APIs on specific ports. These considerations are essential when deploying a service:
- Dockerize the code to be deployed
- Specify the ports for service exposure - Define Ports and Domains.
- [Optional] Map domains to the ports to enable communication with other applications - Define Ports and Domains.
- [Optional] Define environment variables and secrets to inject into the code - Environment Variables and Secrets.
- [Optional] Set up an autoscaling policy for production workloads - Autoscaling.
- [Best Practice] Define Liveness/Readiness Probes - Liveness/Readiness Probe.
- [Best Practice] Establish a rollout strategy - Rollout Strategy.
- [Optional] Mount files or volumes to your service - Mounting Volumes and Files.
- Configure Monitoring Dashboards
- Set up Alerting
- Update, Rollback, and Promote your Service
- Set up CI/CD for your Service
- Access data from S3 or other clouds
To deploy your first service, choose one of the following guides based on the location of your service code:
Updated about 17 hours ago