SQL Server

SSRS Scale Out with Standard Edition Containers

In this article we examine the use of SSRS containers combined with database cloning as a new approach to SSRS scale out, and one that supports use of SQL Server standard edition.


Multiple web front-ends for scaling SQL Server report services is a popular deployment architecture that combines SQL Server Enterprise Edition instances with Always On availability groups. Windocks recently released Windows SQL Server containers with SSRS support, which is drawing attention for new approaches to SSRS deployment. One approach combines SQL Server standard edition containers with database clones to provide each container a complete data environment. The same approach can also be used with standard edition SQL Server instances.

SSRS Image 1 750 x 480

Database cloning is a key aspect of the SSRS scale out architecture, with database clones providing each container a complete set of databases. Two or more VMs operated behind a load balancer delivers a highly available and scalable reporting service. This article focuses on Windows SQL Server containers and Windows Virtual Hard Drive (VHD) based cloning, but the same architecture can support SQL Server Linux containers or conventional instances (Windows or Linux). Other options include the use of storage arrays instead of Windows VHD based clones. The trade-offs between SQL containers and instances, and between VHDs and storage arrays are covered in separate sections below.

The combination of SSRS containers with database cloning is appealing for simplicity and operational savings. SSRS containers are also drawing interest as part of public cloud strategies, as SSRS containers can be integrated with AWS RDS or SQL Azure databases to provide a horizontally scalable reporting solution.

Database Cloning

Database cloning originated with storage arrays, with volume snapshots supported by a parent volume with read-only data access and Copy on Write for changes. This approach delivers large data environments in seconds, but has seen limited use due to complex scripting and maintenance involved.

The Windows file system does not support volume snapshots, but a similar solution is achieved with Virtual Hard Drives (VHDs). Database clones involve a parent Virtual Hard Drive that is mounted to SQL Server with source database backups restored to the VHD, creating a full byte copy of the environment. The parent VHD supports creation of clones (differencing disks), with each clone supporting read/write operation using a Copy on Write from the parent image. Creation of the parent VHD takes time to build as the backups are restored, and becomes an immutable image. Clones are delivered in seconds, occupy <40 MB on delivery, and grow dynamically as changes are made.

Database clones can include dozens of databases, and scale to multiple terabytes. Windows VHD support was introduced with Windows Server 2008, and is proven in production support of Hyper-V. Windows VHD based database cloning is relatively new, from Windocks and Red Gate, but VHDs are widely used in support of production SQL Server VMs, so it seems reasonable that VHD database cloning be explored for support of qualified SQL Server production use-cases.

Building a database clone image

Container images are built using plain text dockerfiles. The example dockerfile uses the SQL Server 2016 SSRS image. Source databases, Report Server and Tempdb backups are included with separate lines with paths to their location. T-SQL and PowerShell scripts can be included to address database or instance configuration.

The SSRS container delivers the database engine and report server running in a shared container as Windows Services. The report server is delivered configured with a default report server database, so to avoid database name conflicts the report server database name in the dockerfile must include reportserverssrs in the db name, and the tempdb must include both reportserverssrs and tempdb in the database name.

SSRS Image 2 750 x 212

Open a command prompt and build the image: >docker build -t c:\path\to\dockerfile. The image is confirmed by running >docker images.

ssrs image 3 750 x 368

Images are immutable, and deliver identical environments for each host in the scale out architecture. To support SSRS reporting the image should be updated daily. This is accomplished with PowerShell scripts to monitor the backup folder, and to automate the image build when the new backups are delivered. When the daily updated image is completed, the containers are created and pre-existing containers are deleted. This process provides effective 24 x 7 reporting.

Deliver SSRS containers with data

The image delivers the SSRS container and a complete set of databases, so each container (or instance) can operate independently, without resource contention. Images supporting conventional SQL Server instances use a similar dockerfile. Containers are created using >docker create , and started by referencing the first few digits of the container ID, >docker start .

SSRS image 4 750 x 353

Access the new container using Windows Auth, and SQL Server Management studio, using the image name (server\Instance10005).



ssrs image 5 660 x 520

Working with a web UI

While the SSRS scale out operation would normally be automated, a web UI simplifies management and creation of images and containers. The image below shows the available images along with the current containers. A visual tool is also included for the selection of dockerfiles for image building. Access to the web UI includes user/group level authentication.

SSRS image 7 750 x 430

Load balancers

SSRS scale out architectures require a load balancer to distribute inbound traffic to the instances. The only difference posed in the new scale out architecture is a need to handle distribution of traffic to SQL Server containers that share a host IP address, but operate on separate ports. This is handled with an inbound Network Address Translation rule that forward traffic to specific ports on the container host. NAT and port forwarding are supported by most enterprise load balancers.

SQL Server containers or instances?

Container adoption is growing rapidly with industry-wide adoption for DevOps and modernization strategies. Microsoft emphasizes SQL Server containers on linux, and the strategic role of containers for modern IT and development. Both SQL containers and conventional instances are well supported for this SSRS scale out architecture.

 

Security: SQL Server instances deliver established security for on-premise and public cloud. Windocks SQL Server containers are widely adopted among financial services, and have evolved to address the stringent security needed. Security includes compatibility with Active Directory and Windows Authentication, and containers are in-fact conventional SQL Server instance (named instance), and support existing encryption systems, include encrypted secrets, and support operation as a secure “SQL Server sandbox.” Visit the docs section for more information on Windocks container security, and how it fulfills the needs outlined in NIST SP 800-120.

Public cloud and on-premise: on the public cloud SQL Server is typically used as part of AWS RDS or SQL Azure services. SQL Server containers provide support for automated and horizontally scalable solution, and are generally preferred for CI/CD and DevOps strategies. For on-premise use Windocks supports use of existing storage arrays and VHD clones, with database clone delivery to containers and instances, providing freedom to work with both containers and instances.

Storage Arrays or Windows VHDs

The trade-off between VHD and storage arrays boils down to access, and scalability. Virtually all SQL Server environments reside in a Windows environment and support Windows based VHD cloning. Windows VHD clones scale to support images up to 3-4 TB when matched with high performance SSD storage (Storage Spaces Direct can support significantly larger images). Windows VHD cloning is the first choice of DBAs, due to the ease of adoption. Storage arrays, on the other hand, provide greater image scalability and performance, with some added complexity involved in coordinating use with storage infrastructure teams. When storage arrays are available, and images exceed 4 TB, they are preferred.

New options for SSRS scale out

Windows Virtual Hard Drives (VHDs) have been used to host production SQL Server environments for many years, and this article details how VHDs can be applied to support SSRS scale out with SQL server standard edition. SSRS containers are being adopted to address gaps in public cloud services, and create new architectures for SSRS scale out. Many should also benefit from the freedom to support use of cloned environments with both SQL Server containers and conventionally installed instances.

You can get started today in exploring these new architectures by downloading the free Community Edition..

Similar posts

Get notified on new test data management insights

Be the first to know about new insights on DevOps and automation in the test data management space.