Can we deploy Spring Batch application on Azure like windows scheduler ?

ramesh Kumar 6 Reputation points
2021-02-08T13:37:07.987+00:00

Can we deploy Spring Batch application on Azure like windows scheduler ? We have spring batch application where currently running on windows scheduler, we created a bat file and created a task scheduler, where it will trigger frequently based on the configuration we provided.
Do we have anything with Azure ? can i deploy my spring batch application ?

Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
303 questions
Azure Spring Apps
Azure Spring Apps
An Azure platform as a service for running Spring Boot applications at cloud scale. Previously known as Azure Spring Cloud.
109 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Krish G 2,326 Reputation points
    2021-02-15T18:25:51.873+00:00

    While I do not have much details about your current application, it would be bit difficult to give any concrete recommendation. But on a high level, you have multiple options:

    • Just use a VM :): It might be bit lame approach while in Azure, and does not change much from your current on-premise solution. Keep the executable copied to the VM and a Windows scheduled task inside the VM to trigger your bat file. Like any IaaS solution, you would be in charge of managing and monitoring your app as Azure would only provide you the infrastructure here. Rest of the options below are PaaS.
    • Spring cloud Function with Timer trigger: With little bit of refactoring you can wrap you current sprint boot app to a Spring cloud Azure Function. Refer Getting started with Spring Cloud Function in Azure. The example there uses http trigger, but you can refer an example of Timer trigger here. Also, be aware of the limitations of different tiers of Azure Function by referring Azure Functions hosting options. Depending on the nature of your app (e.g. duration, scale demand, cost sensitivity etc.), you would need to choose appropriate Function plan. For general guide of Azure Function, refer Azure Functions documentation
    • Containerized solution: Well, this again have multiple options for hosting, but it is more of 'lift and shift' approach with minimal or no change in code. You just need to pack your current app into a container (Spring Boot with Docker) and deploy into one of the following options (not in any particular order).
      • Azure Function with custom container: Again, it's Azure Function. Refer Create a function on Linux using a custom container. NOTE: Custom container is not supported in Function Consumption plan.
      • Azure Container Instance with Logic App trigger: Here, 1. Deploy your container in Azure Container Instances. 2. Use Logic App ACI connector to start your container group when needed and then stop once done. For details on the connector, refer this. 3. This action can be scheduled using a recurrence trigger in Logic App.
      • Deploy to AKS or Service Fabric: Consider this option only if you are planning a bigger migration to Azure for multiple existing applications/services and is inline with your overall cloud migration strategy. For only a single application, it might be overkill and costly.
        • Azure Batch: Well, it might be bit impractical for you since would need almost a rewrite. But thought to be worthy mention. Refer Azure Batch documentation
    2 people found this answer helpful.