How Microsoft brought SQL Server to Linux

Back in 2016, when Microsoft announced that SQL Server would soon run on Linux, the news came as a majorsurprise to users and pundits alike. Over the course of the last year, Microsofts support for Linux (and open source in general), has come into clearer focus and the companys mission now seems to be all about bringing its tools to wherever its users are.

The company today launched the first release candidate of SQL Server 2017, which will be the first version to run on Windows, Linux and in Docker containers. The Docker container alone has already seen more than 1 million pulls, so there can be no doubt that there is a lot of interest in this new version. And while there are plenty of new features and speed improvements in this new version, the fact that SQL Server 2017 supports Linux remains one of the most interesting aspects of this release.

Ahead of todays announcement, I talked to Rohan Kumar, the general manager of Microsofts Database Systems group, to get a bit more info about the history of this project and how his team managed to bring an extremely complex piece of software like SQL Server to Linux. Kumar, who has been at Microsoft for more than 18 years, noted that his team noticed many enterprises were starting to use SQL Server for their mission-critical workloads. But at the same time, they were also working in mixed environments that included both Windows Server and Linux. For many of these businesses, not being able to run their database of choice on Linux became a friction point.

Talking to enterprises, it became clear that doing this was necessary, Kumar said. We were forcing customers to use Windows as their platform of choice. In another incarnation of Microsoft, that probably wouldve been seen as something positive, but the companys strategy today is quite different.

Kumar also noted that many enterprises were looking for an alternative to Oracles database products. If you want to run Linux and use a proprietary relational database with full enterprise support, you arent exactly spoiled for choice, after all.

As Kumar told me, this wasnt the first time his team looked at Linux support. We had a couple of discussions in the past where it wasnt approved, he told me. It wasnt something considered to be a strategic way for the business. But three years ago now with Satya Nadella at the top of the company the team decided to pitch this idea again.The biggest surprising part was that we were expectinga whole lot of back and forth. It was really surprising to see how quickly the decisions got made, Kumar said.

With the decision made, the team faced a daunting task, though: how do you port the tens of millions of lines of SQL Servers code to Linux? Kumar didnt want to make any compromise in functionality either, so it either had to be the full core of SQL Server or nothing at all (and for now, that excludes the graphical user interfaces and tools the company offers on Windows).

Sitting over a bowl of pho at a Vietnamese restaurant in Redmond, the team found its answer: Drawbridge. Drawbridge was a research project that launched back in 2011 which basically provided a container with a small API surface and a basic version of Windows configured to efficiently run the application in the container. The idea here was basically to build better and more secure virtual machines. The library OS then executes the application, handles memory management and other vital functions, and integrates with the underlying operating system.

About two years ago, the SQL Server team decided to make this the core of its Linux efforts. The leadership expressed the right amount of concern, Kumar commented and my guess is that there was indeed quite a bit of concern given that Drawbridge was very much an experimental project. But the SQL Server team took over the Drawbridge code base and added it into the SQL OS layer.

This OS layer was, in many ways, what made this project possible. Because SQL Servers needs always went beyond what Windows and Windows Server were able to offer, especially with regard to memory management, the team had already built many of the standard OS features into SQL Servers OS layer already. Thanks to this, SQL Server in Drawbridge could manage its own memory, too, for example. The work on this was successful enough that the team didnt just build this for SQL Server on Linux but actually merged SQL OS and the work it did on Drawbridge into the new SQL Platform Abstraction Layer that now runs on Windows and Linux.

As a result, the SQL Server team can work from a single code base and doesnt really have to worry about where the code will run (and this includes Microsofts Azure platform).

SQL Server for Linux should reach general availability later this year. Even today, a couple of companies are already using it in production, and the Linux version now runs as fast as the Windows version (assuming comparable hardware).

Looking beyond the final release, Kumar noted that the team would take a close look at what to do next. While innovation in the database space continues to accelerate, not all of Microsofts customers want annual (or even faster) updates for their mission-critical systems. Given that weve lately seen annual SQL Server releases with SQL Server 2016 and 2017, though, Id be surprised if we didnt hear about the first SQL Server 2018 preview releases sooner rather than later.

Read more:


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s