> For the complete documentation index, see [llms.txt](https://docs.release.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.release.com/reference-documentation/workflows-in-release/parallel-deployments.md).

# Parallel deployments

You may find that Release's default serial deployment is slow. A series of 30-second deployments can add up to several minutes when executed serially.

To improve on deployment time, you can break your Release workflow up into **steps** and allow steps to run **tasks** in parallel.

Let's take a look at how parallel deployment works.

## Steps

Steps run sequentially.

You can break your workflow up into serial-dependent steps to ensure that prerequisites are set up first, before dependent services or databases are deployed. This is the same way the default serial deployment works.

## Tasks

You can then group tasks together under the workflow steps, and each step can run in parallel as long as there are no interdependencies between tasks in a step.

## Errors

Errors are typically ignored during tasks because Kubernetes can automatically restart and keep trying until a service succeeds.

For example, if service B depends on service A, and you mistakenly run service B before service A, service B may fail to start. Kubernetes will retry service B and if service A is now functioning, then service B will start properly.

This may not be the behaviour you want, however. A job in a task might be critical to some dependency further on in the tasks or steps, and you may prefer the whole chain to fail as soon as a failure is detected. In such a case, you can use the `halt_on_error: true` key to stop the stage and abort the deployment. Any services or jobs successfully started in a previous step or task may still be running or have run, though, so we recommend you assess how you will clean up on the next run.

## Waiting

You may not want to wait for a task to succeed completely before moving on. This may be the case, for example, if a frontend takes a long time to deploy and has no particular dependencies in the steps. You can start the task in an earlier step and use the `wait_for_finish: false` key to let it run in parallel with the other steps.

## Visualizing parallel deployments

Here's an example workflow definition:

```yaml
workflows:
  - name: setup
    parallelize:
    - step: frontend
      tasks: [services.frontend]
      wait_for_finish: false
    - step: migrate
      tasks: [jobs.migrate, jobs.scrub]
      halt_on_error: true
    - step: backend
      tasks: [services.backend]
```

These steps would deploy like this:

![](https://585411240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1neGLLQ0sDXeK6ooSo%2Fuploads%2Fgit-blob-c1ad0a04a882f54f98f7a9de32bf8968088d8416%2FParallel%20Workflow.jpg?alt=media)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.release.com/reference-documentation/workflows-in-release/parallel-deployments.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
