Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2023 10:22 PM
@Mars Su :
Yes, you can implement zero downtime deployment of Spark Structured Streaming in Databricks job compute using Terraform. One way to achieve this is by using Databricks' "job clusters" feature, which allows you to create a cluster specifically for running a job. Here's how you can implement zero downtime deployment using Terraform:
- Create a new job cluster for the new version of your Spark application code. Use the databricks_job_cluster resource in Terraform to create the new cluster. You can specify the version of Spark to use, as well as any other configurations necessary for your application.
- Once the new cluster is created, deploy the new version of your Spark application code to the cluster. You can do this using the databricks_job resource in Terraform, which allows you to specify the cluster ID for the job to run on.
- Once the new job is running on the new cluster, gradually drain traffic from the old job to the new job. You can do this by slowly reducing the batch size or rate of data that is sent to the old job, and increasing it on the new job.
- Once all traffic has been redirected to the new job, you can safely terminate the old job and delete its cluster.
By following these steps, you can achieve zero downtime deployment of your Spark Structured Streaming job in Databricks using Terraform. Note that you should thoroughly test your new job before switching all traffic to it, to ensure that it is working correctly and does not cause any issues in production.