Header

TAR Deployments: Faster, More Reliable Deployments

DeployHQ offers a powerful and efficient way to deploy your projects: TAR deployments. This method bundles your project files into a single archive before transfer, resulting in significantly faster uploads and deployments, especially for projects with numerous small files.

TAR Deployments

Why TAR Deployments are Faster

Transferring a single TAR archive is considerably faster than transferring hundreds or thousands of individual files, especially over network connections with higher latency. Here's why:

  • Reduced Overhead: Each file transfer involves connection establishment, metadata exchange, and data transfer. With a TAR archive, this overhead is incurred only once for the entire archive, rather than for every single file.

  • Fewer Round Trips: Transferring many small files requires numerous back-and-forth communication rounds between your server and DeployHQ. A single TAR file drastically reduces these round trips, leading to faster transfer speeds.

  • Compression: TAR archives are often compressed (e.g., using gzip), further reducing the amount of data that needs to be transferred.

This speed advantage becomes increasingly pronounced as your project size and the number of files grow. For larger projects, TAR deployments can significantly reduce deployment times.

Fallback to Individual Files

DeployHQ's TAR deployment mechanism includes a crucial safety net. If, for any reason, the TAR archive deployment fails (e.g., corruption during transfer), DeployHQ will automatically fall back to deploying the individual files. This ensures that your deployments remain reliable, even in the event of an issue with the TAR archive. You get the speed benefits of TAR deployments with the assurance of a robust fallback mechanism.

Required Tools

To utilise TAR deployments in DeployHQ, your deployment server requires the following tools:

  • tar: For creating and extracting TAR archives.
  • gzip: For compressing and decompressing TAR archives (optional, but recommended).
  • rsync: For efficient file synchronisation (used for the fallback deployment method).
  • jq: For parsing JSON responses when using the DeployHQ API.

Installing Required Tools on Ubuntu (Example)

If your deployment server is running Ubuntu (or a similar Debian-based distribution), you can install these tools using the following commands:

1- Update Package List:

  sudo apt-get update

2- Install Packages:

  sudo apt-get install tar gzip rsync jq

3- Verify Installation: You can verify the installation by checking the version of each tool:

  tar --version
  gzip --version
  rsync --version
  jq --version

If you are using a different Linux distribution, use the appropriate package manager (e.g., yum for CentOS/RHEL, dnf for Fedora, pacman for Arch Linux) to install these packages. The package names are usually the same (tar, gzip, rsync, jq).

Enabling TAR Deployments in DeployHQ

To enable TAR deployments for your project, navigate to your project settings within DeployHQ. Look for the deployment options and select the "TAR" deployment method. Keep in mind that the Deployment Artefacts should also be enabled and it is now available as a Beta Feature.

By using TAR deployments in DeployHQ, you can significantly improve your deployment speed and efficiency, especially for larger projects. The automatic fallback mechanism ensures reliability, and the simple installation process makes it easy to get started.

Tree

Proudly powered by Katapult. Running on 100% renewable energy.