Types of Services
There are three types of services you can deploy on Porter: web services, workers, and jobs.
Web Service
Web services are long-running processes that are exposed to external or internal traffic. This includes any web servers that are serving requests on a domain.
Web services are, by default, exposed on a domain automatically generated by Porter, which follows the form of *.onporter.run
. You can add a custom domain to your web service - Porter will automatically secure your endpoints with SSL certificates. Alternatively, you can expose your web service to only internal traffic (i.e. accessible only by other services inside the same cluster).
Worker
Worker processes are constantly running processes that are exposed to neither external nor internal traffic. Workers have no URLs or ports - they’re best suited for background processes, queuing systems, etc. Most of the configuration options are identical to web applications, excluding the options that manage the endpoint.
Jobs and Cron Jobs
Jobs are processes that run to completion. They’re best suited for ephemeral tasks such as database migration or clean up scripts.
On Porter, you can run either one-off jobs or cron jobs. One-off jobs can be triggered manually through the dashboard or using the CLI. Cron jobs run periodically on a schedule specified as a cron expression.