Trace Id is missing
September 21, 2021

ÖBB expands its business and improves time to market using Azure

Technical Story

Every day, more than 1 million travelers rely on the timely services of ÖBB—Austrian Federal Railways—Austria’s largest mobility services provider. As one of the most punctual train services in Europe, ÖBB prides itself on efficiency and great customer service by offering a range of mobility solutions that get people and goods where they need to go. The Ticketshop platform on Azure is an example of innovation in efficiency for ÖBB customers, who use it like a ticket counter, travel guide, and travel agency all rolled into one.

OBB

A few years ago, the Ticketshop platform development, testing, and production environments ran entirely in ÖBB’s on-premises datacenter. Today, thanks to a huge team effort, Ticketshop runs on an agile hybrid platform that spans on-premises resources and the latest Azure services, including Azure Database for PostgreSQL – Flexible Server. Using the new platform, ÖBB can release software faster and scale up capacity, enabling the company to extend Ticketshop to transportation agencies across Austria as a business-to-business (B2B) service.

“Moving over to Azure is definitely one of the most important parts of our technology roadmap. Azure enables the enterprise to deliver faster and more flexibly, while maintaining our levels of security and compliance.”

Werner Huss, Ticketshop Head of Engineering, ÖBB

A new approach to Ticketshop

ÖBB Ticketshop is the multitenant, one-stop shop for passengers buying railway tickets and using other services from ÖBB. Ticketshop serves multiple sales channels, including mobile apps, ticket vending machines, point-of-sale counters, and web services for its partners. Ticketshop is also sold to other transportation entities as a generic platform to which customers can add their own branding.

“We set the goal to create a ticket-selling platform that can be used for all public transportation in Austria. We have to grow, and therefore we have to be scalable,” explains Christian Lipp, ÖBB Senior Project Manager. To operate Ticketshop at this scale suggested cloud computing, an area that the engineers had only begun to investigate.

Ticketshop includes multiple sales interfaces, but it’s also a comprehensive platform made up of approximately 50 complex containerized services, each with its own dependencies and database requirements. At the start of the project, the primary Oracle database used to store reservation data was 11 terabytes (TB) and growing because of the regulatory requirement to preserve sales receipts for seven years.

The idea of migrating 11 TB of Oracle data made the project daunting in its scope, and ÖBB could not afford downtime for this critical public service. “This project required long-term planning,” Lipp observes. “We knew that it wouldn't be a good idea to just move Ticketshop to the cloud. So we decided to start with a smaller system and migrate it to Azure.”

The IT team at ÖBB saw an opportunity to take a new approach to Ticketshop using the version deployed in the state of Tyrol—Verkehrsverbund Tirol (VVT). Travelers in Tyrol use the Ticketshop VVT–branded version to plan journeys aboard the local train, bus, and tram routes. The VVT tenant stores hundreds of gigabytes (GB) of data, making it substantially smaller than ÖBB Ticketshop (the tenant used by ÖBB) and a better target for a move to Azure.

As Lipp recalls, “We used the VVT project to learn how to go into the cloud. It was fast, and it taught us a lot about Azure.”

For travelers, sales personnel, and partners, Ticketshop offers a unified user experience across all sales channels, independent from the sales interface used—for example, ticket counters, ticket vending machines, travel agencies, and mobile apps. 

Containers ease the challenge of a platform shift

The first challenge faced by the team was to separate Ticketshop VVT services from the Oracle servers and other operations that took place in ÖBB’s datacenter. ÖBB Ticketshop, the main tenant, ran on-premises, where the software for all application services was built and delivered using the RPM Package Manager (RPM). To make the app’s architecture more portable, the IT team containerized the app and used Kubernetes, the popular open-source container orchestrator, to manage the cluster.

As a development approach, containers have the advantage of flexibility. A container encapsulates all the code and libraries needed to run a particular service, and the container can run virtually anywhere. The IT team decomposed the Ticketshop app into approximately 50 containerized microservices that run on a pool of compute hosts managed by Kubernetes. 

The team also set up an infrastructure as code (IaC) process that enabled the developers to deliver one application to multiple environments. “It was one of our first decisions,” Lipp explains. “We wanted to deliver the same application on-premises for the ÖBB branch and in the cloud for the VVT branch. So we migrated from RPM to Docker and Kubernetes. Our new deployment format was to use Docker images and Kubernetes on both sides.”

Initially, the team set up a Kubernetes environment in ÖBB’s datacenter but chose platform as a service (PaaS) for VVT—Azure Kubernetes Service (AKS). AKS simplifies the task of deploying a Kubernetes cluster by offloading the operational overhead to Azure. 

Deployment to the two branches is straightforward. As ÖBB Technical Architect Walter Pongratz points out, “The only difference is that some configuration options are set differently on the VVT branch compared to the ÖBB branch. Even some of the development and test stages are shared.” 

The branched deployment helped ease the migration of the Ticketshop services to Azure. Using containers, development teams can work independently on different projects, using their tools of choice. For example, the team working on the reservations system can make updates independently of the dozens of teams that work on other systems which control routing details, handle payments, and track the customer loyalty programs.

The entire build process, from development to test to preproduction to production, takes one week. “We moved from provisioning infrastructure to provisioning a true service technology,” recalls Werner Huss, Ticketshop Head of Engineering. “That’s what I see as one of the main advantages to using Azure—delivering services faster and more flexibly.”

“Using Azure for releasing software increases our cost benefits. This allows us an increased degree of automation and frees up resources for operations so we can focus on DevOps rather than keeping an eye on the infrastructure.”

Werner Huss, Ticketshop Head of Engineering, ÖBB

From lift-and-shift to managed services for 11 TB of data

Like many projects, the Ticketshop migration and deployment evolved over time. Initially, the IT team chose a simple lift-and-shift of the data tier. The team moved the on-premises databases containing all credit card transactions and other critical data to Azure Virtual Machines. For testing purposes, this was the quickest way to get both the app and data layers of Ticketshop VVT running on Azure.

“In the Azure cloud, we can run storage-optimized virtual machines. That’s something you just can't do on premises, and that makes it cheaper and better to be in the cloud,” reports Pongratz.

However, the licensing fees for the huge Oracle servers began to add up. Since the license was up for renewal, the team looked for another database solution. The first choice was PostgreSQL, an open-source database known for its ability to store large, sophisticated datasets, such as the JSON data used by ÖBB. The PostgreSQL PL/pgSQL language is also similar to the Oracle PL/SQL language, which makes it easier for developers to port applications.

The team set up a test environment on-premises, and PostgreSQL was a success. The only downside was that it required more operational overhead than desired. Azure Database for PostgreSQL provided the solution—a managed database service that runs fully compatible Postgres and supports the latest versions and popular PostgreSQL extensions.

First, the team moved Ticketshop VVT from an Oracle database with hundreds of gigabytes of data to Azure Database for PostgreSQL. After extensive performance testing, the team was ready to tackle the much larger ÖBB data tier with terabytes of data.

Around this time, Microsoft announced Azure Database for PostgreSQL – Flexible Server, a service that supports more customizations for server configuration and offers server colocation for lower latency between the app and data tiers.

Flexible Server also delivers a high availability configuration with automatic failover capability using zone redundant server deployment. As Pongratz notes, “With this architecture, even if a zone fails, that's also something that Flexible Server fixes.”

“All our services were highly optimized for performance on the Oracle servers,” Pongratz says. “Flexible Server saved the project and enabled us to go live.”

To move the data from Oracle to Azure Database for PostgreSQL, the Microsoft advisors suggested a live migration. A live migration keeps all the environments in sync, with no downtime, while gradually replacing the Oracle-based data tier architecture with Azure Database for PostgreSQL. The team uses Striim, a tool for streaming data integration, to capture changes in the source database in real time, while the team builds the Azure environment.

“We can seamlessly switch between Postgres in the cloud and Oracle on-premises, and there is no data loss,” Lipp reports. “This is an extremely powerful migration approach.” The migration is scheduled to be complete at the end of the year.

ÖBB continues to work closely with Microsoft on database optimizations while running a staggered, hybrid deployment and operating a round-the-clock service for customers. Some Ticketshop services continue to run on-premises as the teams work through the data dependencies.

As Huss notes, “With Microsoft’s experience, we could overcome project difficulties. I see a strong partnership that we can rely on, so we are in a good position for future challenges.”

“If we hadn’t received Azure Database for PostgreSQL – Flexible Server, we would have been forced to stop the project. Microsoft really supported us so we could continue.”

Christian Lipp, Senior Project Manager, ÖBB

Services in AKS Cluster infographic
Ticketshop services run in containers in AKS clusters. The data migration replaced Oracle servers on-premises with PaaS on Azure, including Azure Database for PostgreSQL.

Platform services in a digital transformation

ÖBB cites the convenience of PaaS as one of the benefits of moving Ticketshop to a new technical foundation. Azure provides pay-as-you-go flexibility, freeing ÖBB from the expense and complexity of buying and managing software licenses. ÖBB has control over the applications and services it develops, while Azure manages the underlying application infrastructure, middleware, container orchestration, and other resources. In addition, Flexible Server recently added support for reserved instances, which can help ÖBB save more by prepaying for compute resources.

According to Huss, “The most important aspect is pay-as-you-go and the capability of scaling up and down as we need it to serve our business needs. That and the advantage of instantaneous deployment.”

As the migration went on, ÖBB used more and more Azure services, including Azure Active Directory for identity management and Azure Monitor for tracking resources and logging telemetry. The team also replaced the virtual machine (VM) running Redis, which is used to store key-value pairs, with Azure Cache for Redis. As a managed service, Azure Cache for Redis provides secure and dedicated Redis server instances and full Redis API compatibility. In addition, ÖBB is evaluating and adding Azure network security services, such as Azure Web Application Firewall and Azure DDoS Protection Standard, which provides defense against distributed denial-of-service (DDoS) attacks.

Now the company has only one infrastructure component to manage—the MongoDB database running on a Linux virtual machine. And even that is slated for change. “We set up MongoDB on our own in VMs and still use it in our sync,” Lipp explains, adding that the team plans to replace it eventually.

“Using software as a service and not operating software products ourselves on-premises is a big benefit of moving to Azure.”

Walter Pongratz, Technical Architect, ÖBB

Next steps

Azure is the key to ÖBB’s plans to roll out Ticketshop across Austria, and the new platform is attracting business. Several partners are already asking for their own versions of Ticketshop. Separating the Ticketshop platform from other railway operational systems made it possible to create a true multitenant service.

The move to Azure has been a milestone in ÖBB’s technical roadmap. “I see us at the starting point in our cloud journey,” Huss notes. “We started by using the Azure stack as an infrastructure replacement, but the further we move on, the more we see that we can strongly benefit from moving up the service stack, such as using Azure Database for PostgreSQL as a service implementation.”

For example, the company is evaluating Azure Cosmos DB for PostgreSQL. This deployment option provides greater scale and performance as ÖBB’s applications grow.

Huss also credits Azure as the reason that ÖBB has been able to keep pace with the rapid rate of change. “When it comes to service innovation, time to market is key,” he says. “The more flexible we are, and the less friction we have in deploying new services, the better we can support our ambitious time-to-market goals. And Azure is key to that.”

“We have a long-term cloud strategy, and when we started, we said we want to have Amazon or Microsoft. We chose Microsoft because you're the best on the market.”

Christian Lipp, Senior Project Manager, ÖBB

Take the next step

Fuel innovation with Microsoft

Talk to an expert about custom solutions

Let us help you create customized solutions and achieve your unique business goals.

Drive results with proven solutions

Achieve more with the products and solutions that helped our customers reach their goals.

Follow Microsoft