Download as pdf or txt
Download as pdf or txt
You are on page 1of 45

Azure SQL Hyperscale Revealed:

High-performance Scalable Solutions


for Critical Data Workloads 1st Edition
Zoran Bara■
Visit to download the full and correct content document:
https://ebookmass.com/product/azure-sql-hyperscale-revealed-high-performance-scal
able-solutions-for-critical-data-workloads-1st-edition-zoran-barac-2/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Azure SQL Hyperscale Revealed: High-performance


Scalable Solutions for Critical Data Workloads 1st
Edition Zoran Bara■

https://ebookmass.com/product/azure-sql-hyperscale-revealed-high-
performance-scalable-solutions-for-critical-data-workloads-1st-
edition-zoran-barac/

Developing Cloud-Native Solutions with Microsoft Azure


and .NET: Build Highly Scalable Solutions for the
Enterprise 1st Edition Ashirwad Satapathi

https://ebookmass.com/product/developing-cloud-native-solutions-
with-microsoft-azure-and-net-build-highly-scalable-solutions-for-
the-enterprise-1st-edition-ashirwad-satapathi/

Modern Data Architecture on Azure: Design Data-centric


Solutions on Microsoft Azure 1st Edition Sagar Lad

https://ebookmass.com/product/modern-data-architecture-on-azure-
design-data-centric-solutions-on-microsoft-azure-1st-edition-
sagar-lad/

Practical Graph Structures in SQL Server and Azure SQL:


Enabling Deeper Insights Using Highly Connected Data
1st Edition Louis Davidson

https://ebookmass.com/product/practical-graph-structures-in-sql-
server-and-azure-sql-enabling-deeper-insights-using-highly-
connected-data-1st-edition-louis-davidson-2/
Practical Graph Structures in SQL Server and Azure SQL:
Enabling Deeper Insights Using Highly Connected Data
1st Edition Louis Davidson

https://ebookmass.com/product/practical-graph-structures-in-sql-
server-and-azure-sql-enabling-deeper-insights-using-highly-
connected-data-1st-edition-louis-davidson/

Pro SQL Server 2022 Wait Statistics: A Practical Guide


to Analyzing Performance in SQL Server and Azure SQL
Database, 3rd Edition Thomas Larock

https://ebookmass.com/product/pro-sql-server-2022-wait-
statistics-a-practical-guide-to-analyzing-performance-in-sql-
server-and-azure-sql-database-3rd-edition-thomas-larock/

Pro SQL Server 2022 Wait Statistics: A Practical Guide


to Analyzing Performance in SQL Server and Azure SQL
Database, 3rd Edition Thomas Larock

https://ebookmass.com/product/pro-sql-server-2022-wait-
statistics-a-practical-guide-to-analyzing-performance-in-sql-
server-and-azure-sql-database-3rd-edition-thomas-larock-2/

Beginning Azure Functions: Building Scalable and


Serverless Apps 2nd Edition Rahul Sawhney

https://ebookmass.com/product/beginning-azure-functions-building-
scalable-and-serverless-apps-2nd-edition-rahul-sawhney/

Beginning Azure Functions: Building Scalable and


Serverless Apps 2nd Edition Rahul Sawhney

https://ebookmass.com/product/beginning-azure-functions-building-
scalable-and-serverless-apps-2nd-edition-rahul-sawhney-2/
Azure SQL
Hyperscale
Revealed
High-performance Scalable Solutions
for Critical Data Workloads

Zoran Barać
Daniel Scott-Raynsford
Azure SQL Hyperscale
Revealed
High-performance Scalable Solutions
for Critical Data Workloads

Zoran Barać
Daniel Scott-Raynsford
Azure SQL Hyperscale Revealed: High-performance Scalable Solutions for Critical
Data Workloads
Zoran Barać Daniel Scott-Raynsford
Resolution Drive, Auckland, 0930, New Zealand Victory Road, Auckland, 0604, New Zealand

ISBN-13 (pbk): 978-1-4842-9224-2 ISBN-13 (electronic): 978-1-4842-9225-9


https://doi.org/10.1007/978-1-4842-9225-9

Copyright © 2023 by Zoran Barać and Daniel Scott-Raynsford


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Jonathan Gennick
Development Editor: Laura Berendson
Editorial Assistant: Shaul Elson
Cover image by Felipe Portella from Unsplash
Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza,
Suite 4600, New York, NY 10004-1562, USA. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@
springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole
member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc
is a Delaware corporation.
For information on translations, please e-mail booktranslations@springernature.com; for reprint,
paperback, or audio rights, please e-mail bookpermissions@springernature.com.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub. For more detailed information, please visit www.apress.com/source-code.
Printed on acid-free paper
Table of Contents
About the Authors���������������������������������������������������������������������������������������������������� xi

About the Technical Reviewers����������������������������������������������������������������������������� xiii

Introduction�������������������������������������������������������������������������������������������������������������xv

Part I: Architecture����������������������������������������������������������������������������������������� 1
Chapter 1: The Journey to Hyperscale Architecture in Azure SQL��������������������������� 3
SQL on Azure��������������������������������������������������������������������������������������������������������������������������������� 5
The Basics of Azure SQL���������������������������������������������������������������������������������������������������������� 5
Azure SQL Platform as a Service�������������������������������������������������������������������������������������������������� 7
Deployment Models����������������������������������������������������������������������������������������������������������������� 9
Purchasing Models and Service Tiers����������������������������������������������������������������������������������� 10
Availability Models and Redundancy������������������������������������������������������������������������������������� 13
Standard Availability Model: Locally Redundant Availability�������������������������������������������������� 15
General Purpose Service Tier: Zone-­Redundant Availability�������������������������������������������������� 16
Premium and Business Critical Service Tier: Locally Redundant Availability������������������������ 18
Premium and Business Critical Service Tier: Zone-­Redundant Availability��������������������������� 19
Protecting Against Regional Outages Using Failover Groups with
Geo-redundant Availability���������������������������������������������������������������������������������������������������� 21
The Hyperscale Service Tier������������������������������������������������������������������������������������������������������� 22
Hyperscale Architecture Overview���������������������������������������������������������������������������������������� 24
Deploying Your First Hyperscale Database���������������������������������������������������������������������������� 25
Cleaning Up��������������������������������������������������������������������������������������������������������������������������� 34
Summary������������������������������������������������������������������������������������������������������������������������������������ 35

iii
Table of Contents

Chapter 2: Azure SQL Hyperscale Architecture Concepts and Foundations����������� 37


Hyperscale Azure SQL Scalability and Durability������������������������������������������������������������������������ 38
Foundations of Azure SQL Hyperscale���������������������������������������������������������������������������������������� 40
The Buffer Pool Extension����������������������������������������������������������������������������������������������������� 41
The Resilient Buffer Pool Extension��������������������������������������������������������������������������������������� 41
Investigating the Size of RBPEX�������������������������������������������������������������������������������������������� 41
Row Versioning–Based Isolation Level���������������������������������������������������������������������������������� 45
Accelerated Database Recovery�������������������������������������������������������������������������������������������� 48
Multitier Architecture Concepts in Hyperscale���������������������������������������������������������������������������� 49
Compute Nodes��������������������������������������������������������������������������������������������������������������������� 50
Log Service���������������������������������������������������������������������������������������������������������������������������� 58
Page Servers������������������������������������������������������������������������������������������������������������������������� 61
Azure Standard Storage�������������������������������������������������������������������������������������������������������� 68
How Do the Tiers Work Together?������������������������������������������������������������������������������������������ 70
Summary������������������������������������������������������������������������������������������������������������������������������������ 74

Part II: Planning and Deployment����������������������������������������������������������������� 75


Chapter 3: Planning an Azure SQL DB Hyperscale Environment���������������������������� 77
Considerations When Planning for Hyperscale��������������������������������������������������������������������������� 77
The Azure SQL Database Logical Server������������������������������������������������������������������������������� 78
Considerations for Reliability������������������������������������������������������������������������������������������������� 81
Considerations for Network Connectivity������������������������������������������������������������������������������ 94
Considerations for Security������������������������������������������������������������������������������������������������� 108
Considerations for Operational Excellence�������������������������������������������������������������������������� 119
Summary���������������������������������������������������������������������������������������������������������������������������������� 124

Chapter 4: Deploying a Highly Available Hyperscale Database


into a Virtual Network������������������������������������������������������������������������� 125
An Example Hyperscale Production Environment��������������������������������������������������������������������� 126
The Starting Environment��������������������������������������������������������������������������������������������������������� 129
The Starting Environment Deployment Script��������������������������������������������������������������������� 131

iv
Table of Contents

Deploying the Starting Environment Using the Azure Cloud Shell��������������������������������������� 133
Creating a SQL Administrators Group���������������������������������������������������������������������������������� 136
Deploying a Highly Available Hyperscale Database into a Virtual Network������������������������������� 139
Basic Configuration of the Database����������������������������������������������������������������������������������� 141
Configuring Network Connectivity��������������������������������������������������������������������������������������� 146
The Final Configuration Tasks and Deployment������������������������������������������������������������������� 150
Deleting the Example Environment������������������������������������������������������������������������������������������� 155
Summary���������������������������������������������������������������������������������������������������������������������������������� 157

Chapter 5: Administering a Hyperscale Database in a Virtual Network


in the Azure Portal������������������������������������������������������������������������������ 159
Administering a Hyperscale Database in a Virtual Network������������������������������������������������������ 160
Deploying a Management VM and Azure Bastion���������������������������������������������������������������� 163
Using the Management VM with an Azure Bastion�������������������������������������������������������������� 167
Summary���������������������������������������������������������������������������������������������������������������������������������� 170

Chapter 6: Configuring Transparent Data Encryption to Bring Your Own Key������ 171
Enabling Customer-Managed Key Transparent Data Encryption����������������������������������������������� 172
Creating a User-Assigned Managed Identity����������������������������������������������������������������������� 174
Granting the Key Vault Crypto Officer Role to a User����������������������������������������������������������� 175
Generating a Key in the Azure Key Vault������������������������������������������������������������������������������ 178
Granting Access to the Key by the User-Assigned Managed Identity���������������������������������� 180
Assigning the User-Assigned Managed Identity to the Logical Server�������������������������������� 182
Enabling Customer-Managed TDE��������������������������������������������������������������������������������������� 184
Summary���������������������������������������������������������������������������������������������������������������������������������� 185

Chapter 7: Enabling Geo-replication for Disaster Recovery��������������������������������� 187


Deploying a Hyperscale Geo Replica����������������������������������������������������������������������������������������� 188
Creating a Logical Server in the Failover Region���������������������������������������������������������������� 189
Connecting a Logical Server to a Virtual Network with Private Link����������������������������������� 191
Enabling the Customer-Managed Key TDE�������������������������������������������������������������������������� 196
Enabling Geo-replication of a Hyperscale Database����������������������������������������������������������� 198
Summary���������������������������������������������������������������������������������������������������������������������������������� 200

v
Table of Contents

Chapter 8: Configuring Security Features and Enabling Diagnostic


and Audit Logs������������������������������������������������������������������������������������ 203
Enabling Microsoft Defender for SQL���������������������������������������������������������������������������������������� 204
Storing Diagnostic and Audit Logs�������������������������������������������������������������������������������������������� 206
Sending Audit Logs to a Log Analytics Workspace�������������������������������������������������������������� 207
Sending Database Diagnostic Logs to Log Analytics����������������������������������������������������������� 209
Summary���������������������������������������������������������������������������������������������������������������������������������� 211

Chapter 9: Deploying Azure SQL DB Hyperscale Using PowerShell���������������������� 213


Introduction to Infrastructure as Code�������������������������������������������������������������������������������������� 214
Imperative vs. Declarative Infrastructure as Code�������������������������������������������������������������������� 215
Deploying Hyperscale Using Azure PowerShell������������������������������������������������������������������������ 216
The Azure PowerShell Modules������������������������������������������������������������������������������������������� 216
Deploying the Starting Environment������������������������������������������������������������������������������������ 218
The Complete Deployment PowerShell Script��������������������������������������������������������������������� 218
Azure PowerShell Commands in Detail������������������������������������������������������������������������������� 220
Summary���������������������������������������������������������������������������������������������������������������������������������� 239

Chapter 10: Deploying Azure SQL DB Hyperscale Using Bash and Azure CLI������� 241
Deploying Hyperscale Using the Azure CLI������������������������������������������������������������������������������� 241
The Azure CLI����������������������������������������������������������������������������������������������������������������������� 242
Deploying the Starting Environment������������������������������������������������������������������������������������ 243
The Complete Deployment Bash Script������������������������������������������������������������������������������� 245
Azure CLI Commands in Detail�������������������������������������������������������������������������������������������� 247
Summary���������������������������������������������������������������������������������������������������������������������������������� 264

Chapter 11: Deploying Azure SQL DB Hyperscale Using Azure Bicep������������������� 267
About Azure Bicep��������������������������������������������������������������������������������������������������������������������� 268
Deploying Using Azure Bicep���������������������������������������������������������������������������������������������������� 268
A Complete Azure Bicep Deployment���������������������������������������������������������������������������������� 268
Hyperscale Resources in Azure Bicep��������������������������������������������������������������������������������� 271
Summary���������������������������������������������������������������������������������������������������������������������������������� 284

vi
Table of Contents

Chapter 12: Testing Hyperscale Database Performance Against Other


Azure SQL Deployment Options��������������������������������������������������������� 285
HammerDB�������������������������������������������������������������������������������������������������������������������������������� 286
HammerDB TPROC-C Workload������������������������������������������������������������������������������������������� 287
HammerDB Step-by-Step���������������������������������������������������������������������������������������������������� 287
Schema Build Performance Metrics������������������������������������������������������������������������������������ 301
TPROC-C Workload Metrics������������������������������������������������������������������������������������������������� 312
Summary���������������������������������������������������������������������������������������������������������������������������������� 336

Part III: Operation and Management����������������������������������������������������������� 339


Chapter 13: Monitoring and Scaling��������������������������������������������������������������������� 341
Monitoring Platform Metrics����������������������������������������������������������������������������������������������������� 342
Viewing Metrics with the Metrics Explorer�������������������������������������������������������������������������� 342
Streaming Metrics to a Log Analytics Workspace��������������������������������������������������������������� 344
Alerting on Platform Metrics����������������������������������������������������������������������������������������������� 345
Monitoring and Tuning Database Performance������������������������������������������������������������������������� 351
Monitoring Query Performance������������������������������������������������������������������������������������������� 351
Performance Recommendations����������������������������������������������������������������������������������������� 352
Automatically Tuning Database Performance���������������������������������������������������������������������� 352
Gathering Insights from the Database�������������������������������������������������������������������������������������� 353
SQL Analytics���������������������������������������������������������������������������������������������������������������������������� 354
Scaling a Hyperscale Database������������������������������������������������������������������������������������������������ 357
Manually Scaling Up a Hyperscale Database���������������������������������������������������������������������� 358
Manually Scaling Out a Hyperscale Database��������������������������������������������������������������������� 359
Autoscaling a Hyperscale Database������������������������������������������������������������������������������������ 360
Summary���������������������������������������������������������������������������������������������������������������������������������� 360

Chapter 14: Backup, Restore, and Disaster Recovery������������������������������������������ 361


Hyperscale Database Backups������������������������������������������������������������������������������������������������� 361
Backup Retention Policy������������������������������������������������������������������������������������������������������ 362
Backup Storage Redundancy���������������������������������������������������������������������������������������������� 365
Monitoring Backup Storage Consumption with Azure Monitor Metrics������������������������������� 367

vii
Table of Contents

Hyperscale Database Restores������������������������������������������������������������������������������������������������� 368


Example 1: Restore to Same Region, LRS to LRS���������������������������������������������������������������� 369
Example 2: Restore to Same Region, LRS to GRS���������������������������������������������������������������� 371
Example 3: Restore to the Same Region, GRS to GRS��������������������������������������������������������� 372
Example 4: Geo Restore to Different Region, GRS to LRS���������������������������������������������������� 372
Example 5: Geo-restore to Different Region, GRS to GRS���������������������������������������������������� 373
Comparing Restore Performance of Hyperscale to Traditional Azure SQL Databases��������� 375
Disaster Recovery��������������������������������������������������������������������������������������������������������������������� 377
Summary���������������������������������������������������������������������������������������������������������������������������������� 379

Chapter 15: Security and Updating����������������������������������������������������������������������� 381


Azure SQL Database Security Overview������������������������������������������������������������������������������������ 381
Network Security����������������������������������������������������������������������������������������������������������������� 384
Access Management����������������������������������������������������������������������������������������������������������� 387
Auditing and Azure Threat Detection����������������������������������������������������������������������������������� 390
Information Protection��������������������������������������������������������������������������������������������������������� 392
Updating and Maintenance Events������������������������������������������������������������������������������������������� 396
Summary���������������������������������������������������������������������������������������������������������������������������������� 398

Chapter 16: Managing Costs�������������������������������������������������������������������������������� 399


Azure Hybrid Benefit����������������������������������������������������������������������������������������������������������������� 399
Reserving Capacity������������������������������������������������������������������������������������������������������������������� 401
Purchasing Reserved Capacity�������������������������������������������������������������������������������������������� 401
Estimating Reserved Capacity Benefits������������������������������������������������������������������������������� 402
Utilizing Reservations���������������������������������������������������������������������������������������������������������� 402
Scaling In and Scaling Down Replicas�������������������������������������������������������������������������������������� 403
Summary���������������������������������������������������������������������������������������������������������������������������������� 405

Part IV: Migration��������������������������������������������������������������������������������������� 407


Chapter 17: Determining Whether Hyperscale Is Appropriate������������������������������ 409
Key Considerations for Hyperscale������������������������������������������������������������������������������������������� 409
Scalability���������������������������������������������������������������������������������������������������������������������������� 410
Reliability����������������������������������������������������������������������������������������������������������������������������� 413

viii
Table of Contents

Business Continuity������������������������������������������������������������������������������������������������������������� 413


Cost������������������������������������������������������������������������������������������������������������������������������������� 416
Summary���������������������������������������������������������������������������������������������������������������������������������� 418

Chapter 18: Migrating to Hyperscale�������������������������������������������������������������������� 419


Common Migration Methods����������������������������������������������������������������������������������������������������� 419
In-Place Conversion of an Azure SQL Database to Hyperscale������������������������������������������� 421
Migrating to Hyperscale with Data Migration Assistant������������������������������������������������������ 425
Migrating to Hyperscale with the Azure Database Migration Service��������������������������������� 432
Migrating with ADS with the Azure SQL Migration Extension���������������������������������������������� 443
Migrating to Hyperscale Using Import Database����������������������������������������������������������������� 444
Migrating to Hyperscale Using a Data Sync and Cutover���������������������������������������������������� 446
Summary���������������������������������������������������������������������������������������������������������������������������������� 447

Chapter 19: Reverse Migrating Away from Hyperscale���������������������������������������� 449


Reverse Migration Methods������������������������������������������������������������������������������������������������������ 450
Reverse Migration Using the Azure Portal��������������������������������������������������������������������������� 450
Reverse Migration Using Transact SQL�������������������������������������������������������������������������������� 453
Reverse Migration Using Azure CLI�������������������������������������������������������������������������������������� 454
Common Pitfalls of the Reverse Migration Process������������������������������������������������������������������ 456
Migrating to an Unsupported Service Tier��������������������������������������������������������������������������� 456
Database Not Eligible for Reverse Migration����������������������������������������������������������������������� 457
Summary���������������������������������������������������������������������������������������������������������������������������������� 457

Chapter 20: Conclusion����������������������������������������������������������������������������������������� 459

Index��������������������������������������������������������������������������������������������������������������������� 461

ix
About the Authors
Zoran Barać is a cloud architect and data specialist
with more than 15 years of hands-on experience in
data optimization, administration, and architecture. He
is a Certified Microsoft Trainer (MCT) and Microsoft
Certified Solutions Expert (MCSE) with a master‘s degree
in information technology. Sharing knowledge and
contributing to the SQL Server community are his passions.
He is also an organizer of the Auckland SQL User Meetup
Group, an active blogger, and a speaker at different SQL events such as Data Summits,
SQL Saturdays, SQL Fridays, meetups, etc.

Daniel Scott-Raynsford is a partner technology strategist


at Microsoft with 15 years of experience as a software
developer and solution architect. He specializes in DevOps
and continuous delivery practices. He was a Microsoft MVP
in cloud and data center management for three years before
joining Microsoft and is an active PowerShell open-­source
contributor and Microsoft DSC Community Committee
member. He is also a contributor to the Azure Architecture
Center on multitenant architecture practices.

xi
About the Technical Reviewers
Jonathan Cowley is a cloud infrastructure engineer,
DevOps practitioner, and technical documentation writer
with more than 15 years of experience in various roles and
environments, in both small and large corporations and
public organizations. He has been Microsoft Azure and AWS
certified. He enjoys connecting people and information and
solving challenging problems.

Vitor Fava has earned the title of Most Valuable Professional


(MVP AI and Data Platform) and the main certifications
related to SQL Server, such as MCP, MCTS, MCITP, MCSA,
and MCSE. A DBA with more than 20 years of experience
in database and information technology, Vitor works on
the development, implementation, maintenance, and
support of large corporate database servers. Vitor graduated
with a degree in information systems from Universidade
Presbiteriana Mackenzie/SP, with an emphasis on high-
performance and mission-critical database environment
management.He has been a speaker at several technology events, such as SQLBITS,
SQL Saturday, The Developers Conference (TDC), SQL Porto, InteropMix, and several
discussion groups focused on database technology. Vitor also provides advanced
training in SQL Server and Azure SQL Database, in addition to acting as an MCT
in official Microsoft training. He is also the chapter leader of the PASS Chapter SQL
Maniacs in São Paulo, Brazil.

xiii
Introduction
Azure SQL is a platform-as-a-service (PaaS) relational database management system
(RDBMS) that is provided as part of the Azure cloud and based on the Microsoft SQL
Server platform. This offering contains service tiers that make it suitable for a wide
range of use cases, from small single-user applications to mission-critical lines of
business workloads. However, there is only one service tier that provides the high level
of scalability and resilience that is required by some of today’s largest cloud-based
workloads: Hyperscale.
In this book, we’ll take you through the capabilities and basics of the Azure SQL
Database Hyperscale service tier. You’ll learn the basics of designing, deploying, and
managing Azure SQL Hyperscale databases. We’ll look in detail at the resilience (high
availability and disaster recovery) and scalability of Azure SQL Hyperscale databases and
how to tune them. We will also look at the different techniques you can use to deploy and
configure Azure SQL Hyperscale.
Monitoring and securing Azure SQL Hyperscale databases will also be covered to
ensure your workloads continue to perform and operate securely. This book will be your
guide to deciding when Hyperscale is a good fit for migrating your existing workloads
and what architectural considerations you should make in your application. Finally,
you’ll learn how to migrate existing workloads to Azure SQL Database Hyperscale.
This book is intended for data architects, software engineers, cloud engineers,
and site reliability engineers and operators to learn everything they need to know to
successfully design, deploy, manage, and operate Azure SQL Database Hyperscale.
You’ll learn what makes Azure SQL Database Hyperscale architecture different
from a more traditional database architecture and why it’s important to understand the
architecture.
To get the most out of this book, you should have a basic knowledge of public cloud
principles and economics as well as a fundamental knowledge of Azure, Microsoft SQL
Server, and RDBMSs. It is not required to have experience using Azure SQL Database.
This book will provide you with everything you need to know to effectively build and
operate the Hyperscale tier of Azure SQL Database without prior experience.

xv
Introduction

Although this book covers concepts that apply to Azure SQL Database in general,
it is intended to provide everything you need to know to run an Azure SQL Database
Hyperscale tier in Azure without requiring any other material. You may find content that
is covered in other more general books on running SQL in Azure, but this book looks at
these concepts through the Hyperscale lens. Hyperscale has special use cases that make
it unique, which also require specific knowledge to get the most out of it.
Thank you for venturing into the world of Hyperscale database technology.
A note about the recently announced automatic compute scaling with serverless for
Hyperscale in Azure SQL Database: At the time of writing this book, the possibility of
an automatically scaling Hyperscale with a serverless compute tier was merely an item
on the roadmap. We did not, therefore, cover it in detail, even though we were aware it
was planned. However, serverless Hyperscale has just arrived in public preview. This
development does not change the guidance provided in this book, but serverless should
be considered for Hyperscale workloads that need high levels of elasticity. It is yet another
tool in the amazing array of data storage services available in Microsoft Azure and should
be on your list of considerations when determining if Hyperscale is right for you.
Serverless Hyperscale automatically adjusts the compute resources of a database
based on its workload and usage patterns. It also allows different replicas of the
database to scale independently for optimal performance and cost efficiency. Serverless
Hyperscale is different from provisioned compute Hyperscale, which requires a fixed
number of resources and manual rescaling.
For more information on the serverless Hyperscale announcement, see this page
https://techcommunity.microsoft.com/t5/azure-sql-blog/automatic-compute-
scaling-with-serverless-for-hyperscale-in/ba-p/3624440.

xvi
PART I

Architecture
CHAPTER 1

The Journey to
Hyperscale Architecture
in Azure SQL
Every day, many billions or even trillions of transactions are processed by the ever-­
growing number of Azure SQL databases deployed globally in the Microsoft Azure public
and government clouds. The number of transactions and the size of these databases
are continuously increasing. The accelerating adoption of public cloud technology has
enabled new use cases for Azure SQL databases as well as the migration of larger line-of-­
business applications from on-premises SQL servers.
As the public cloud continues to mature, businesses are moving more of their
mission-critical workloads to Azure. This results in the need to support larger and larger
databases.
Accompanying this move to the cloud, the demand for IT departments and
engineering teams to provide more application features with greater resilience and
security has also increased. This pressure has caused organizations to look at how
they can cut down on the operational costs of maintaining their infrastructure. The
requirement to reduce operational expenditure has led toward running more databases
as platform-as-a-service (PaaS) solutions—where the cloud provider takes care of the
day-to-day operations of the infrastructure—freeing the organization to focus on higher-­
value tasks.
As well as the migration of enterprise-scale databases, an increase in the adoption
of software-as-a-service (SaaS) solutions by consumers and organizations has led to
SaaS providers needing larger databases, higher transaction throughput, and increasing
resilience—while also being able to scale quickly.

3
© Zoran Barać and Daniel Scott-Raynsford 2023
Z. Barać and D. Scott-Raynsford, Azure SQL Hyperscale Revealed,
https://doi.org/10.1007/978-1-4842-9225-9_1
Chapter 1 The Journey to Hyperscale Architecture in Azure SQL

This explosive shift by organizations to adopting SaaS has also facilitated a need by
SaaS providers to manage costs as they scale. This has often resulted in a change from a
single database per tenant to a multitenant approach. A multitenant approach can help
to reduce costs, but it also increases the need for larger capacities and throughput, while
being able to assure isolation and avoid challenges such as noisy neighbors. For an in-­
depth explanation on that, see https://learn.microsoft.com/azure/architecture/
antipatterns/noisy-neighbor/noisy-neighbor.
The growth trend toward SaaS is expected to continue as organizations and SaaS
providers accommodate the expectations of their customers to gain greater value
from their data with analytics and machine learning. This growth in demand for better
analytics and machine learning abilities also facilitates the need to collect more data,
such as usage telemetry and customer behavior data.
New types of application workloads and patterns, such as event streaming
architectures and the Internet of Things (IoT), have also increased the demands on
relational database management systems. Although alternative architectures exist to
reduce the impact of these application workloads on the relational database, they don’t
completely mitigate the need for larger relational databases as a part of applications.
Customers are expecting solutions that can integrate with and accept data from other
services and data sources. This is leading organizations and SaaS providers to build a
greater level of integration into their software and also to be seen as platforms with an
ecosystem of third-party applications and extensions springing up around them. This is
further pushing the scale and elasticity required by the relational database management
system (RDBMS) underlying these platforms.
Applications are also consuming data from more and more systems and providing
their own combined insights and enhancements. For example, applications that
integrate with Microsoft Teams might retrieve calling and messaging data and combine
it with other data sources to provide additional functionality. As the volume of data
increases within these systems, so does the need for more capacity in the application
database that collects it.
Azure provides the Azure SQL Database service, a PaaS product, that includes
several different tiers offering options for capacity and resilience while also enabling a
high degree of scale.
The changing data landscape, driven by the cloud, SaaS, and newer workloads, has
resulted in the need for a design change to the Azure SQL Database architecture to be
pushed to the limit, requiring a completely new internal architectural approach: the
Hyperscale architecture.
4
Chapter 1 The Journey to Hyperscale Architecture in Azure SQL

Hyperscale is the newest service tier of the Azure SQL Database and provides
highly scalable compute and storage that enables it to significantly exceed the limits of
the other tiers of service. This is achieved by substantial alterations to the underlying
architecture. These changes are discussed in more detail in Chapter 2.

Tip Throughout this book we’ll often refer to the Azure SQL Database Hyperscale
service tier as just Hyperscale to make it easier on you, the reader.

At its core, Hyperscale helps us address these changing requirements, without


the need to adopt radically different architectures or fundamentally change our
applications—which in this new world of high demand for applications and features is a
great thing.

SQL on Azure
It’s been a long and progressive journey of more than 12 years from the beginnings of
Azure SQL called CloudDB all the way up to the new Azure SQL Database Hyperscale
service tier and Hyperscale architecture.
Before we can get into the details of Hyperscale, we will start by looking at the
different ways that SQL workloads can be hosted in Azure. This will give us a view of
where Hyperscale fits within the portfolio and when it is a good choice for a workload.

The Basics of Azure SQL


There are many benefits to hosting your data workloads in the cloud. Whether you
want to utilize modern cloud offerings using Azure SQL Database, migrate an existing
workload and retain your current SQL Server version running on an Azure virtual
machine (VM), or simply adopt the newest SQL Server features, Azure SQL might be the
right choice for you.
Fundamentally, there are two distinct ways SQL workloads can be deployed in Azure.

• As infrastructure as a service (IaaS) using SQL Server on Azure VMs


• As a platform as a service (PaaS) using Azure SQL Database (DB) or
Azure SQL Managed Instance (MI)

5
Chapter 1 The Journey to Hyperscale Architecture in Azure SQL

Both Azure SQL deployment types (IaaS and PaaS) offer you redundant, secure, and
consistent cloud database services. However, with IaaS you are responsible for more of
the system, requiring a greater amount of effort from you in maintaining and ensuring
the system is resilient and secure.

Tip Azure SQL MI is a PaaS database service with a higher level of isolation and
compatibility with SQL Server on Azure VMs or on-premises SQL Servers.

Running SQL Server on Azure VMs provides you with the ability to configure every
aspect of the underlying infrastructure, such as compute, memory, and storage as well
as the operating system and SQL Server configuration. This high level of configurability
comes with an increased operational cost and complexity. For example, operating
system and SQL Server upgrades and patching are the user’s responsibility.
By comparison, Azure SQL DB (and Azure SQL MI) is a managed database service
where users do not need to worry about SQL Server maintenance tasks—such as
upgrades, patching, or backups—or service availability. The Azure platform abstracts
and manages these important aspects of your environment automatically, significantly
reducing operational costs and complexity. This often results in a much lower total cost
of ownership (TCO).
Generally, PaaS provides significant benefits that make it extremely attractive;
however, in some cases, IaaS is still required. Some applications might need access to the
underlying SQL instance or features of SQL Server that are not available on Azure SQL DB.

Tip For some workloads that need features that Azure SQL DB does not provide,
Azure SQL MI might still be an option. This could still allow the workload to be
moved to Azure, while leveraging the significant benefits of PaaS. For a comparison
between Azure SQL DB and Azure SQL MI features, see https://learn.
microsoft.com/azure/azure-sql/database/features-comparison.

Workloads that are being migrated from on-premises or a private cloud often require
IaaS when they are first migrated into Azure but will be able to be re-platformed onto
Azure SQL DB after some modernization. The benefits of this usually far outweigh the
engineering costs of modernization. Another reason that IaaS might be needed is to gain
a higher level of infrastructure isolation for regulatory compliance reasons.

6
Chapter 1 The Journey to Hyperscale Architecture in Azure SQL

Figure 1-1 compares the administration needs and costs of on-premises, private
cloud machines, IaaS, and PaaS. We can see that PaaS has lower administration needs
and costs than IaaS.

Figure 1-1. Continuum of cost and administration of different hosting models

We will be focusing primarily on Azure SQL DB, as this is the only deployment model
that supports the newest service tier: Hyperscale.

Azure SQL Platform as a Service


When you select Azure SQL PaaS, you are getting a fully managed database service.
Whichever deployment model you choose, you will always have some level of
redundancy, starting with local redundancy and if available zone or geo-redundancy.

7
Another random document with
no related content on Scribd:
then, and seek the Lord their God, and David their King, then they
shall fear the Lord and His goodness in the latter days. (Hosea iii. 5.)
In the consideration of the deliverance from Egypt there is, however,
one circumstance which should teach the Israelites to rejoice with
trembling, and that is, that the majority of those, who went forth from
Egypt, never entered the land of Israel, but died in the wilderness on
account of their sin and unbelief. That which has happened, may
happen again. Israel might be delivered again from the lands of their
dispersion, and be led forth with a mighty hand, and outstretched
arm, and with great signs and wonders, and yet after all die in their
sins. Indeed, it is not merely a legitimate deduction from the past, but
an express prophecy of the future. “As I live, saith the Lord God,
surely, with a mighty hand, and with a stretched out arm, and with
fury poured out, will I rule over you; and I will bring you out from the
people, and will gather you out of the countries wherein ye are
scattered, and with a mighty hand, and with a stretched out arm, and
with fury poured out. And I will bring you into the wilderness of the
people, and there will I plead with you face to face. Like as I pleaded
with your fathers in the wilderness of the land of Egypt, so will I plead
with you, saith the Lord God. And I will cause you to pass under the
rod, and I will bring you into the bond of the covenant.”
‫וברותי מכם המורדים והפושעים בי מארץ מגוריהם אוציא אותם ואל אדמת ישראל‬
‫לא יבוא ׃‬
“And I will purge out from among you the rebels, and them that
transgress against me; I will bring them forth from the country where
they sojourn, and they shall not enter into the land of Israel.” (Ezek.
xx. 33-38.) Here then we see, whether we consider the past or the
future, that a mere temporal deliverance is not sufficient—that God’s
greatest temporal blessings, and even his mighty signs and
wonders, may lead us in the more dreadful and fatal captivity of sin.
Surely if a miraculous deliverance could deliver the soul, those that
saw the miracles in Egypt, and experienced the Lord’s mercy in their
preservation from the destroying angel, and in the passage through
the Red Sea, ought to have been perfect in holiness. Yet we find,
after all that they saw and heard, that they were a disobedient and
faithless generation, and that they perished in the wilderness. The
history, then, of this great deliverance reminds us in the most forcible
manner of the bondage of sin, and the necessity of a more noble and
gracious emancipation. Israel was in bondage in Egypt, and the Lord
had compassion and delivered them. All mankind, Jews and
Gentiles, are born slaves to sin, and dreadful is the misery which
they have suffered, and hopeless the prospect for the future, unless
God have provided a way of escape. Now is it likely that that God
who had compassion on the Israelites in their temporal affliction,
should look, unmoved and unpitying, upon the temporal and spiritual
wretchedness of the whole human race? Is it conceivable that those
gracious ears, which heard the cries of Israel in Egypt, should be
deaf to the groans and lamentations of all the sons of men? Is it
consistent with the Bible-character of God to provide a remedy for
temporal sorrow, and yet furnish no means of deliverance from
everlasting woe? Is it like our Heavenly Father to stretch out his
hand to save a few of his children from Egypt, and yet leave the
great majority to perish in ignorance and sin? Blessed be God, who,
in his great mercy, sent Jews to our forefathers to tell us of the blood
of another and greater passover, which can preserve Gentiles as
well as Jews from the wrath to come.
‫משיח פסחנו נזבח בעדנו ׃‬
“Messiah, our passover, is sacrificed for us;” and therefore we too
keep the feast, and join in the hymn of thanksgiving, “Blessed be the
Lord God of Israel, for He hath visited and redeemed his people.”
You remember the paschal lamb of Egypt. We can say—
‫הנה שה אלהים הנושא את חטאות כל העולם ׃‬
“Behold the Lamb of God, that taketh away the sin of the world.” You
remember the sprinkling of blood that delivered your fathers from
temporal death. We rejoice because,
‫דם יּשוע המשיח יטהרנו מכל חטא ׃‬
“The blood of Jesus, the Messiah, cleanseth us from all sin.” You
remember how, four days before the Passover, it was necessary to
select a lamb without spot and without blemish. We think of the true
Paschal Lamb, the Messiah, how, four days before the great
sacrifice, he came up to Jerusalem, and was examined before the
tribunals, and declared to be without sin. Pilate’s testimony was, “Ye
have brought this man unto me, as one that perverteth the people;
and, behold, I, having examined him before you, have found no fault
in this man touching those things whereof ye accuse him: no, nor yet
Herod: for I sent you to him; and lo, nothing worthy of death is done
unto him.” (Luke xxiii. 14, 15.) You remember how the destroying
angel passed over the houses where the blood was sprinkled: we
look forward to that more dreadful time, when he shall come as the
Psalmist describes:—
‫ יקרא אל השמים‬, ‫יבא אלהינו ואל יהרש אש לפניו תאכל וסביביו נשערה מאוד‬
‫ אספו לי חסידי כורתי בריתי עלי זבח ׃‬. ‫מעל ואל הארץ לדין עמו‬
“Our God shall come, and shall not keep silence: a fire shall devour
before him, and it shall be very tempestuous round about him. He
shall call to the heavens from above, and to the earth, that he may
judge his people. Gather my saints together unto me: those that
have made a covenant with me by sacrifice.” (Ps. l. 3-5.) And we
hope to be found amongst that number, and that the blood of the true
Sacrifice will then deliver us. It is evident that the Psalmist here is not
speaking of the sacrifices of the temple, for immediately after we
read—
‫ לו אל זבחיך אוכיחך‬. ‫שמעה עמי ואדברה ישראל ואעידה בך אלהים אלהיך אנכי‬
‫ לו אקח מביתך פר ממכלאותיך עתודים ׃‬. ‫ועולותיך לנגדי תמיד‬
“Hear, O my people, and I will speak; O Israel, and I will testify
against thee: I am God, even thy God. I will not reprove thee for thy
sacrifices or thy burnt offerings, to have been continually before me.
I will take no bullock out of thy house, nor he goats out of thy folds.”
Here God plainly excepts the offerings of bulls and goats, and
thereby overthrows the exposition of Rashi and others, who say that
the covenant and sacrifices here alluded to are the same as those
described at the giving of the law, when Moses said, “Behold the
blood of the covenant,” &c. (Exod. xxiv. 8.) The sacrifices then
offered were “burnt-offerings and peace-offerings of oxen,” which
God here declares that he will not accept. Besides, God is not
speaking of many sacrifices, but of one sacrifice ‫ אלי זבח‬. He is
moreover speaking of one great sacrifice, by virtue of which sinful
men may stand before him as saints at the great day of judgment,
and obtain mercy. This certainty cannot mean the sacrifices of the
Mosaic covenant at Sinai, for by reason of that sacrifice, they will
appear as guilty sinners who have broken God’s covenant, as he
himself says—
‫אשר המה הפרו את ברית ׃‬
“Which my covenant they brake.” (Jer. xxxi. 32.) At that solemn hour
the Mosaic covenant will only condemn, and therefore cannot be
meant here. Indeed the rabbies appear to have felt the
untenableness of this exposition, and therefore invented another
figurative one—
‫ויש דרש כי על ברית מילה שהחזיקו בה ישראל בגלות ׃‬
“There is also an allegorical interpretation referring it to the covenant
of circumcision, which Israel has faithfully adhered to in the captivity.”
(Kimchi, in loc.) But this exposition is as unfounded as the former.
Circumcision is never called a sacrifice in Scripture. Neither will it
serve a man in the day of judgment. What then is the sacrifice which
is here intended? We answer, the true Passover, the blood of the
Messiah, whereby the new covenant is ratified. Some object that the
shedding of blood is altogether unnecessary—that if God will forgive
at all, he can forgive without atonement or sacrifice. But this
objection will equally affect the sacrifice of the first Passover. On the
very same grounds, we may say, What necessity was there for killing
a lamb, and sprinkling its blood upon the door-posts? The directions
given by Moses are very striking—“Kill the passover. And ye shall
take a bunch of hyssop, and dip it in the blood that is in the bason,
and strike the lintel and the two side posts with the blood that is in
the bason; and none of you shall go out at the door of his house until
the morning. For the Lord will pass through to smite the Egyptians;
and when he seeth the blood upon the lintel, and on the two side
posts, the Lord will pass over the door, and will not suffer the
destroyer to come in unto your houses to smite you.” (Exod. xii. 21-
23.) Surely the blood was not necessary to make known to him
which house belonged to an Israelite. He could have saved them as
well without the blood as with it. Why then destroy the life of a lamb,
and give them all this trouble? Suppose that an Israelite had thus
argued at that time, had refused to kill the passover, or having killed
it, had neglected to sprinkle the blood, or having done both, was not
content to abide in his house, but had gone forth before the morning,
what would have been the consequence? Certain punishment. God
was indeed determined to save Israel, but only in a certain way: and
he that did not choose to submit to God’s method, would naturally
lose the benefit of his appointment. Our business is not to argue with
God, but having ascertained His will, to submit to it. Inquire, then,
what God means by “his saints who have made a covenant with Him
by sacrifice;” and endeavour to enter into that covenant, that when
He appears to judgment, ye may be gathered unto Him. If the
Christian view be not the true one, then since the destruction of the
temple there has been no sacrifice, and no way of entering into that
covenant with Him. You observe the season—you abstain from
leaven—but there is no sacrifice. The main, yea the essential,
element of the Passover is wanting. The lamb cannot be slain. And
even if it could be, if you had again a temple and a high-priest, and
all the service of a sanctuary, still the sacrifice of the Passover would
only be a memorial of mercies long since gone by. It would be no
real atonement for your sins, and when you had slain it, and eaten of
it, the question would still remain, How am I, a sinner, to appear in
the presence of the righteous Judge?
The first part of this paper will have shown you, that we are firm
believers in the future glory and blessedness of Israel; that we do
not, therefore, in offering you our hope for eternity, wish to deprive
you of your own hopes for time. No, we wish you every blessing
which God has promised by the mouth of Moses and the prophets,
and can affectionately join in the words—
‫לשנה הבאה בירושִל ם ׃‬
If it should please God to spare us all to see the re-union of all the
families of the earth, we should rejoice to unite with others in
acknowledging “that ye are the seed whom the Lord has blessed.”
But we should rejoice a thousandfold more to meet you in the
heavenly Jerusalem, and to mingle our voices with yours in singing,
“Worthy is the Lamb that was slain to receive power, and riches, and
wisdom, and strength, and honour, and glory, and blessing.” Amen.
No. XIII.
SEVERITY OF THE RABBINIC ORDINANCES.

The feast of the Passover, ordained as a memorial of past mercies,


has at the same time served to remind us of another deliverance
necessary both for Jew and Gentile, and also of a happy time when
“there shall be one fold and one shepherd”—“One Lord and His
name One.” But the blessed anticipations of the future cannot, and
ought not, withdraw our thoughts from the reality of the present. That
happy time is not yet come. Jews and Christians are not yet agreed
as to the articles of faith; and this feast of the Passover especially
directs our attention to the cause and origin of the difference. At this
solemn season of the year, Jesus of Nazareth was condemned by
the Scribes and Pharisees, and by them delivered to the Roman
power to be executed as a malefactor. One portion of the Jewish
nation, and that the majority, concurred in the judgment of the rulers.
Another portion, at first small, but ultimately considerable in number
and station, arraigned the justice of the sentence, and professed
their faith in His Messiahship. The question between Jews and
Christians at present is, which of these two portions of the Jewish
nation was in the right. In these papers we have taken up this simple
position, that the religious system of those who rejected Jesus of
Nazareth is contrary to the law and the prophets, and is therefore
false; whilst the doctrines of Him, that was rejected, are in conformity
with those writings, and must therefore be true. When we say that
the rabbinical system is false, we do not mean that the Pharisees
held no truth. On the contrary, we showed in our last number that
some of their expectations were agreeable to the Word of God, and
therefore true. All we intend is, that the peculiarities of Rabbinism of
which the system is composed are erroneous. The laws relating to
the present festival furnish us with abundant proof of our assertion.
The Divine commands relating to it exhibit the care, consideration,
and condescension of God in providing an opportunity of instruction,
a time of relaxation, and a season of joy for the poor as well as the
rich. The rabbinical laws, on the other hand, are burdensome,
oppressive, and hurtful, especially to the poor and unlearned.
We take our first proof from one of the laws relating to the ‫ארבע כוסות‬
“the four cups”—God has given a simple command to Israel to make
known to their children the reasons for the feast. ‫“ והגדת לבנך וגו׳‬And
thou shalt declare unto thy son in that day, saying, This is done
because of that which the Lord did unto me, when I came forth out of
Egypt.” (Exod. xiii. 8.) In order to fulfil this command, a sort of liturgy
has been composed, much of which is solemn and beautiful: and a
ceremonial appointed, of which one ordinance is, that there should
be four cups or glasses of wine.
‫וכל אחד ואחד בין אנשים בין נשים חייב לשתות בלילה הזה ארבע כוסות אל יין‬
‫ואין פוחתין לו מהן ׃‬
“All persons, whether men or women, are obligated on this night to
drink four cups (or glasses) of wine, and this number is not to be
diminished.” (Hilchoth Chometz, c. vii.) As to the ceremony of the
four cups, the circumstances connected with them evidently show
that they are not for the purpose of revelry, but part of a solemn
religious observance.
‫ כוס ראשון אומר‬. ‫כל כוס וכוס מארבע כוסות הללו מברך עליו ברכה בפני עצמה‬
‫ כוס שלישי מברך עליו ברכת‬. ‫ כוס שני קורא עליו את ההגדה‬. ‫עליו קידוש היום‬
‫ כוס רביעי גומר עליו את ההלל ומברך עליו ברכת השיר ׃‬. ‫המזון‬
“Over each of these four cups a benediction is to be pronounced.
Over the first cup is said the consecration of the day. Over the
second cup the Haggadah is read. Over the third cup the benediction
for food is pronounced. And over the fourth the Hallel is completed,
and the benediction for the song pronounced.” (Ibid.) With a solemn
religious ordinance it is not for us to find fault. On the contrary, in
these and their other prayers, we earnestly wish the Jews the
blessing of God, and the spirit of grace and supplication. But when
we find this human institution imposed as a burden upon the
conscience, and the observance of it exacted from those who have
not the means of gaining their daily bread, we must protest against it
as harsh and oppressive. Now in the oral law this requirement is
made.
‫ וצריך למכור מה‬, ‫מי שאין לו יין עבר אדרבנן דאמרי ולא יפחתו לו מארבע כוסות‬
‫איא לו לקיים מצות חכמים ולא יסמוך על הפת שאם קיים כוס אחד לא קיים‬
‫השלשה לכן ימכור מה שיש לו ולהוציא הוצאות עד שימצא יין או צמוקים ׃‬
“Whosoever has not got wine transgresses a command of the
Rabbies, for they have said, that there is to be no diminution from
the four cups. And it is necessary to sell what he has in order to keep
the command of the wise men. He is not to depend upon the bread,
for if he fulfil the command concerning one cup, he has not fulfilled
that respecting the three. Therefore let him sell what he has, and
furnish the expense, until he procure wine or raisins.” (Arbah Tur.
Orach Chaiim, 483.) It may be replied, that the congregation
furnishes those who have not the means. But what is to become of
those who have displeased the dispensers of the congregation’s
bounty, or what is a Jew to do, who is living alone in the midst of
Gentiles, as is frequently the case, particularly in this country? If he
be a conscientious Rabbinist he must either grieve his conscience by
transgression, or sell what he may not be well able to spare. The
same may also be said of the unleavened cakes. The Rabbies have
given so many directions about the lawful mode of preparing them,
as to make it almost impossible for a Jew, living at a distance from a
congregation, to keep the command, and to keep the poor in a state
of perpetual bondage to the synagogue, if they wish to be supplied
by the bounty of the congregation.
But if this utter want of consideration for the poor is more strikingly
displayed in the institution and exaction of a second holy day, where
God has required the observance of only one, as the Rabbies
themselves acknowledge in the following passage:—
‫ששת ימים האלה שאסרן הכתוב בעשיית מלאכה שהן ראשון ושביעי של פסח‬
‫וראשון וח׳ של חג הסוכות וביום חג השבועות ובאחד לחודש השביעי הן הנקראים‬
‫ ושביתת כולן שוה שהן אסורין בכל מלאכת עבודה חוץ ממלאכה‬. ‫ימים טובים‬
‫שהיא לצורך אכילה שנאמר אך אשר יאכל לכל נפש וכו׳ ׃‬
“These are the six days on which the Scripture has forbidden the
doing of work. The first and seventh day of Passover: the first and
eighth day of the Feast of Tabernacles: the day of the Feast of
Weeks, and the first day of the seventh month; and these days are
called holy days. The sabbatism of all is alike; it is unlawful on them
to do any manner of work, excepting that which is necessary for the
preparation of food, as it is said, ‘Save that which every man must
eat.’ (Exod. xii. 16.)” (Hilchoth Jom. Tov., c. i. 1.) Here is an express
recognition of what God has commanded. And yet the Scribes were
not content with this ordinance of God, but have appointed the
observance of a second day on all these occasions, and have
annexed the sentence of excommunication to any transgression of
their command.
‫ ומנדין עליו‬, ‫ואנו שעושים שני ימים טובים כל מה שאסור בראשון אסור גם בשני‬
‫ ואם הוא צורבא מרבנן אין מחמיריו לנדותו אלא מלקין אותו ׃‬, ‫למי שמזלזל בו‬
“To us, who observe two days, every thing that is forbidden on the
first day, is also forbidden on the second day; and whosoever makes
light of it, is to be excommunicated. But if he be an acute Talmudist
the excommunication is not to be severe, only he is to be beaten.”
(Orach Chaiim, 496.) In the Yad Hachasakah we find the same
severity, and the same exception.
. ‫יום טוב שני אף על פי שהוא מדברי סופרים כל דבר שאסור בראשון אסור בשני‬
‫וכל המחלל יום טוב שני ואפילו של ראש השנה בין בדבר שהוא משום שבות ובין‬
‫במלאכה בין שיצא חוץ לתחום מכין אותו מכת מרדות או מנדין אותו אם לא יהיה‬
‫מן התלמידים ׃‬
“Although the second holy day is only of the words of the Scribes,
every thing that is forbidden on the first day, is forbidden on it also.
And every one who professes the second holy day, even that of the
new year, whether it be in a matter relating to the sabbatism, or by
work, or by going beyond the Sabbath limit, is to receive the beating
denounced against rebellion, or to be excommunicated, unless he be
a learned man.” (Hilchoth Jom. Tov., c. i. 24.) The hardship,
oppression, and severity of this ordinance are apparent at first sight,
and are severely felt by many a poor Jew in this city, who hardly
knows how to get bread for himself and his children. In every case it
robs him in one week of two days, on which God has allowed him to
work, and to endeavour to gain a livelihood. But if the first day of a
festival happen on a Thursday, then that day, Friday, and Saturday,
he dare not do anything to earn the means of subsistence for his
family. Sunday is the Christian Sabbath, so that in one week four
successive days are lost, and in the following week four more. What,
then, is the poor man to do? If he does not work, his children may
starve; if he makes use of the time allowed him by his merciful God,
and pursues his daily occupations, he transgresses a command of
unmerciful men, and renders himself obnoxious to his more bigoted
brethren. True that they cannot now beat him with the stripes
awarded to the rebellious, and that they would hardly dare, in the
present state of things, to excommunicate him; yet there are other
ways and means of persecution more secret, but equally sure. But
whatever be the present circumstances, the cruel and oppressive
spirit of the oral law remains the same. If the Rabbinists had the
power, they would soon proceed to excommunicate and flog all the
profaners of the second holy day. We appeal, then, to the common
sense of every Jew, and ask him, What right have men to rob the
poor of that time which God hath given them? or to sentence a man
who only goes to get bread for his children, and in so doing
transgresses none of God’s commandments, to excommunication or
flogging, especially to that severe species of flogging here specified?
The flogging here spoken of is called ‫מכת מרדות‬, “the flogging of
rebellion,” and is altogether different from that merciful punishment
prescribed in the law. God says, “And it shall be, if the wicked man
be worthy to be beaten, that the judge shall cause him to lie down,
and to be beaten before his face, according to his fault by a certain
number. Forty stripes he may give him, and not exceed; lest, if he
should exceed, and beat him above these with many stripes, then
thy brother should seem vile to thee.” (Deut. xxv. 2, 3.) Here, as
everywhere else, in the midst of judgment, God remembers mercy.
The Rabbies, never satisfied unless they can add to, or diminish
from, God’s commandments, have reduced the number to thirty-
nine, lest they should make any mistake. But to compensate for this
diminution, they have invented “the flogging of rebellion,” which is
without number and without mercy, as may be seen from the
following explanation of the Baal Aruch:—
‫מי שעובר על מצות עשה שאמר לו עשה סוכה עּשה לולב ואינו עושה מכין אותו‬
‫עד שתצא נשמתו בלא אומד ובלא מכה משולשה וכן מי שעובר על דברי חכמים‬
‫מכין אותו בלא מספר ובלא מנין ובלא אומד ולמה קורון אותו מכת מרדות שמרד‬
‫בדברי תורה ובדברי סופרים ׃‬
“Whosoever transgresses an affirmative commandment, for
instance, he was commanded to make a tabernacle, or a lulav, and
did not, he is to be beaten until his soul go out, without any
consideration of his strength, and without dividing the flogging into
three. And, in like manner, whosoever transgresses the words of the
wise men, he is to be beaten without number, and without
consideration. Why is this called the flogging of rebellion? Because
he has rebelled against the words of the law and against the words
of the Scribes.” (Baal Aruch, in voc.) This, then, is the punishment
denounced against those who try to get bread for their children on
the second holy day; a punishment invented by the Rabbies
themselves, not against the immoral or the irreligious, but against the
transgressors of their own commandments. What could have been
the spirit, the temper, the religious feeling of such men? Had they
any perception of the merciful character of the law, or any
resemblance to the compassionate nature of the God of Israel? Can
you put any confidence in the religious instruction of those who
would excommunicate or flog a fellow-creature to death because he
obeyed the instincts of nature, because he could not stay at home
and listen to the cries of his famishing children, but went forth, to
procure them food in the manner, and on the day which God had
permitted him to do so? These are the men who condemned Jesus
of Nazareth to death, and this is the religion of the oral law, which
you prefer to the mild and merciful doctrines of Christianity. If
Rabbinism had continued in its power, you would have been
exposed to all the severity of this intolerance. The triumph of
Christianity has, in this respect, also been a blessing to the Jewish
nation, and the power of the followers of Jesus of Nazareth protects
you from excommunication and corporal chastisement.
The cruelty and hardship of the imposition of a second holy day, with
such a punishment annexed appears not only from the circumstance
of its being altogether a human institution, but further, that the
original object of its institution has long since ceased. The Scribes
appointed the observance of two days at a time, when the feast-days
were fixed by the appearance of the moon, lest those at a distance
from Jerusalem should keep a wrong day, but now that they are fixed
by calculation, this is altogether unnecessary.
‫בזמן הזה שאין שם סנהדרים ובית דין של ארץ ישראל קובעין על חשבון זה היה‬
‫מן הדין שיהיו בכל המקומות עושין יום טוב אחד בלבד אפילו המקומות הרחוקות‬
‫שבחוץ לארץ כמו בני ארץ ישראל שהכל על חשבון אחד סומכין וקובעין אבל‬
‫תקנת חכמים הוא שיזהרו במנהג אבותיהם שבידם ׃‬
“In the present time, when there is no Sanhedrin, nor house of
judgment in the land of Israel, the feasts are fixed by calculation, and
therefore all places, even those that are remote from the land of
Israel, ought properly to observe only one day as a holy day, as well
as the inhabitants of that country, for all depend on and fix the feast
by one and the same calculation; but it is an ordinance of the wise
men to adhere diligently to the custom of their forefathers.” (Hilchoth
Kiddush Hachodesh, c. v. 5.) There is, therefore, no excuse for this
burden imposed upon the poor, and much less for the cruel
punishments, denounced against those who cease to observe what
is confessedly an useless custom. How different is the doctrine of
Christianity with respect to such days. No excommunication, no
flogging, no imposing of burdens upon the consciences of our
brethren. The New Testament condemns even all rash judgment in
such matters. It says, “Who art thou, that judgeth another man’s
servant? To his own master he standeth or falleth. Yea he shall be
holden up, for God is able to make him stand. One man esteemeth
one day above another; another esteemeth every day alike. Let
every man be fully persuaded in his own mind. He that regardeth the
day, regardeth it to the Lord; and he that regardeth not the day, to
the Lord he doth not regard it. He that eateth, eateth to the Lord, for
he giveth God thanks; and he that eateth not, to the Lord he eateth
not, and giveth God thanks. For none of us liveth to himself, and no
man dieth to himself. For whether we live, we live onto the Lord, and
whether we die, we die unto the Lord; whether we live, therefore, or
die, we are the Lord’s.” (Rom. xiv. 2-8.) Here is the spirit of love and
mercy, and therefore the spirit of God. How is it, then, that Jesus and
his disciples were able to overcome the prejudices of their times, and
to stem the torrent of authority and learning, which was altogether in
favour of the opposite opinions? How is it, if they were impostors and
deceivers that they have left a tolerant and merciful system, whilst
the Scribes and Pharisees, who, according to that supposition, were
the true servants of God, have left a religion of oppression and
cruelty? “Ye shall know them by their fruits. Do men gather grapes of
thorns, or figs of thistles? Even so every good tree bringeth forth
good fruit, and every evil tree bringeth forth evil fruit. A good tree
cannot bring forth evil fruit, neither can a corrupt tree bring forth good
fruit.” (Matt. vii. 16-18.) This is certainly true in nature. Now the
Pharisees have brought forth evil fruit, Jesus of Nazareth and his
disciples have brought forth good fruit. What is the conclusion from
such premises?
But we have hitherto spoken only generally of the Institution of a
second holy day, we have yet to consider the details of the
commandment, which will show still more clearly that “The Scribes
and Pharisees bind heavy burdens, and grievous to be borne, and
lay them on other men’s shoulders.” (Matt. xxiii. 4.) They are, as
usual, most exact in defining what is and is not work. They say,
‫כל שאסור בשבת בין משום שהוא דומה למלאכה או מניא לידי מלאכה בין שהוא‬
‫ או‬. ‫משום שבות הרי הוא אסור ביום טוב אלא אם כן היה צורך אכילה וכיוצא בה‬
‫ וכל שאסור לטלטלו‬. ‫דברים שהם מותרים ביום טוב כמו שיתבאר בהלכות אלו‬
‫בשבת אסור לטלטלו ביום טוב אלא לצורך אכילה וכיוצא בה וכל שמותר בשבת‬
‫מותר ביום טוב ׃‬
“Every thing that is unlawful on the Sabbath, either because it has
the appearance of work, or because it leads to work, or on account
of sabbatising, is unlawful on a holy day, unless it be necessary for
the preparation of food, and the like, or such things as are allowed
on the holy day, as will be explained in these constitutions. And
every thing that it is unlawful to move on the Sabbath, is also
unlawful to be moved on the holy day, unless it be necessary for
food: and every thing that is lawful on the Sabbath is lawful on a holy
day.” (Hilchoth Jom. Tov., c. i. 17.) This law effectually ties up the
hands of the poor Rabbinist. He not only dare not pursue his trade,
but he dare not make any domestic arrangement, that might promote
order in his house, or conduce to his comfort. He must not write a
letter to his friends, nor even extinguish a fire, though it be to save
his property.
‫אף על פי שהותרה הבערה ביום טוב שלא לצורך אסור לכבות את האש אפילו‬
‫ וכשם שאין‬, ‫ אהכבוי מלאכה ואין בו צורך אכילה כלל‬, ‫הובערה לצורך אכילה‬
‫ אין‬... ‫מכבין את האש כך אין מכבין את המר ואם כבה לוקה במי שארג או בנה‬
‫מכבין את הדליקה כדי להציל ממון ביום טוב כדרך שאין מכבין בשבת אלא מניחה‬
‫ויוצא ׃‬
“Although it has been pronounced lawful to kindle fire on the holy
day, even where not absolutely necessary, yet it is unlawful to
extinguish fire, even though it had been kindled for the preparation of
food; for the extinguishing of fire is work, and is not at all necessary
for the dressing of food. And as fire is not to be extinguished, so
neither is a candle to be extinguished and whosoever extinguishes is
to be flogged, just as he that weaves or builds.... Fire is not to be
extinguished, in order to save property on a holy day, no more than
on the Sabbath. On the contrary, one lets it burn and goes away.”
(Ibid., c. iv. 2, 4.) In the Arbah Turim this law is laid down with still
more precision.
‫ אסור לכבות‬. ‫אסור לכבות את הדליקה ביום טוב אפילו רואה את ביתו שנשרף‬
‫הבקעת בין אם מכבה מפני שחס עליה שלא תשרף בין אם מכבה שלא תתעשן‬
‫ ודוקא כשאפשר לו להצילה מעישון בלא כבוי כגון שיסירנה מאש זה‬. ‫הקדרה‬
‫ויתננה על אש אחר אבל אם אין לו אש אחר ואם לא יכבנה תתעשן הקדרה מותר‬
‫לכבותה כדי שלא תתעשן הקדרה ׃‬
“It is unlawful to extinguish fire on a holy day, even though a man
should see his house burning. It is unlawful to extinguish split wood,
either for the sake of saving it from being burned, or to keep a pot
from being smoked, that is to say, if he can keep it from being
smoked without extinguishing the fire, as by removing it from one fire
to another. But if he has not got another fire, and if the pot must be
smoked unless he extinguish it, then the extinguishing is lawful, that
the pot may not be smoked.” (Orach Chaiim, 514.) Now we put it to
the common sense of every Jew, whether in these laws there be
justice, mercy, and religion; or hardship, inconsideration, and
absurdity?
No. XIV.
SEVERITY AND ARTIFICE.

The oral law says, as we saw in our last, that, on a holy day, it is
unlawful to extinguish a fire in order to save a man’s house and
property, but that it is lawful, on the same day, to do the very same
thing to keep a pot of cookery from being smoked. This sentence
may perhaps appear wise and pious to those who have got more
houses than one, or the means of procuring them; but with respect to
the poor man, who in such a case loses his all, and must see his
family left without a roof over their heads or a bed to lie on, this
decision is as cruel as it is senseless. There is, however, a tyranny
more dreadful than that which affects only the temporal condition of
men. The spiritual despotism, which burdens and fetters the
conscience and enslaves the soul, is more intolerable still. Under
temporal losses a man’s mind may be supported by a sense of
religion; but when his religion, by the multiplicity and rigour, and
intricacy of its requirements, becomes his tormentor, man is bereft of
his last consolation. The religion of the oral law appears to us to be
of this character, and its enactments with regard to the holy days will
serve to justify this our opinion. We have seen already, that it
requires two days’ cessation from business, where God requires only
one, and that the general rule is, Whatsoever is unlawful on the
Sabbath, is unlawful on the holy day, with one exception. The
Scribes, however, were not content with this, they have contrived to
invent something, which, though lawful on the Sabbath, is on these
days unlawful. They say, that there is a certain class of things, which,
if not deliberately destined the day before for the use of the holy day,
are unlawful. To this class they give the name of ‫ מוקצה‬Muktzeh,
which literally signifies “separated or cut off,” but which, for
shortness’ sake and for want of a better word in English, we shall call
“undestined.”
‫ויש ביום טוב מה שאין בשבת איסור מוקצה שהמוקצה אסור ביום טוב ומותר‬
‫בשבת מפני שיום טוב קל משבת אסרו בו המוקצה שמא יבואו לזלזל בו ׃‬
“There is on the holy day one thing which is not found on the
Sabbath, and that is, the forbidding of the undestined, for the
undestined is unlawful on the holy day, and is lawful on the Sabbath.
Because the holy day is less sacred than the Sabbath, they forbade
the undestined on that day, lest persons should be led to make light
of it.” (Hilchoth Jom. Tov. c. i. 17.)
‫כיצד תרנגולת העומדת לגדל ביצים ושור הצומד לחרישה ויוני שובך ופירות‬
‫העומדין לסחורה כל אלו וכיוצא בהן מוקצה הן ואסור לאכול מהן ביום טוב עד‬
‫שיכין אותה מבערב ויחשוב עליהם לאכילה ׃‬
“For instance, a hen that is kept for the purpose of hatching eggs,
and an ox that is kept for ploughing, pigeons in a pigeon house, and
fruits that are kept for sale, all these and the like are undestined, and
it is unlawful to eat of them on a holy day, unless a man destine them
on the eve preceding, and form an intention to eat them.” (Ibid.) By
this law a numerous class of things is forbidden, which God has no
where forbidden, and fresh chains are forged for the conscience. An
unlearned man can hardly tell what does or does not belong to the
class, and if he be in doubt must first go to the rabbi, before he can
eat or make use of any thing doubtful; for this definition extends not
only to eatables, but to other things, as for instance, fuel. Suppose,
for example, that a man or a family had eaten nuts or almonds on
the eve of the holy day, is it lawful or unlawful to burn the shells on
the holy day itself? The Word of God leaves the Jew at perfect liberty
to do as he pleases, but the oral law tells him that he may by doing
either commit a great sin. If he cannot resolve his scruples in this
matter, he must be content to go to the rabbi or some learned man,
and submit to his decision, and thus every unlearned and devout
Jew is brought into complete captivity to the decisions of the learned.
Another very similar law, and tending to the same bondage, is that
which makes any thing that is born or comes into existence on the
holy day, unlawful.
‫ חול מכין לשבת וחול מכין ליום‬. ‫וכשם שהמוקצה אסור ביום טוב כך הנולד אסור‬
‫ לפיכך ביצה שנולדה‬. ‫טוב אבל אין יום טוב מכין לשבת ולא שבת מכינה ליום טוב‬
‫ביום טוב אחר השבת אסורה ׃‬
“And as the undestined is unlawful on the holy day, so also what is
born is unlawful. On a common day a man may destine things for the
Sabbath, and also for the holy day. But on a holy day things may not
be destined for the Sabbath, nor on the Sabbath for the holy day,
therefore an egg that is laid on the holy day after the Sabbath is
unlawful.” (Ibid.) Now not to speak of the minute trifling of this law,
there are cases where it may become very oppressive. Suppose that
by some means an unlawful egg should get amongst a number of
lawful eggs, they would all become unlawful.
‫ואפילו נתערבה באלף כולן אסורות ׃‬
“Yea, though it should be mixed up amongst a thousand, they are all
unlawful.” It is true that the rabbies endeavour to guard against such
on accident, by forbidding the removal of such an egg on the holy
day; but a Gentile or a child might, through inadvertently putting such
an egg amongst others, produce great inconvenience or even loss,
and to this the poor man must submit, or burden his conscience with
a wilful transgression. But this law forbidding to eat or move
whatsoever comes into existence on the holy day extends beyond
the class of eatables. Wood accidentally broken on this day belongs
to this class, and it is therefore unlawful to use it as fuel, or to move
it. In like manner, ashes of wood that has been burnt on the holy day,
is considered as having come into existence, and it is a sin to move
it, when once it has cooled. And again, if a fire should go out on the
holy day, it is a grave question whether the fuel that remains may be
kindled again.
Thus the conscience is burdened with definitions of unlawful, but the
directions about things lawful are quite as numerous and perplexing.
For instance, it is lawful to make a fire on a holy day, and to put on
the pot for cooking, but an unlearned man or woman may commit a
sin in the mode of doing it, and, therefore, the Baal Turim says,
‫כשעושה האש ונותן עליה קדירה צריך ליזהר בסדור העצים ובנתינת הקדירה‬
, ‫עליהם שלא יהיה דומה לבנין דאמר רב יהודה מדורתא מלמעלה למטה שרי‬
‫ממטה למעלה אסור ׃‬
“When one makes a fire and puts on a pot, it is necessary to be very
careful in the arranging of the wood, and the mode of setting the pot
upon it, so that there should be no resemblance to budding, for Rav
Judah has said, every pile of wood begun from the top to the bottom
is lawful, from the bottom to the top is unlawful.” (Orach Chaiim,
502.) For this reason very minute directions are given for the
performance of each of these operations. The fire is to be made in
the following manner:—
‫העושה מדורה ביום טוב כשהוא עורך את העצים אינו מניח זה על זה עד שיסדר‬
‫ ואף על פי שהוא בנין עראי אסור אלא או שופך‬. ‫המערכה מפני שנראה כבונה‬
‫ כיצד מניח עץ למעלה ומניח אחר תחתיו ואחר‬. ‫העצים בערבוב או עורך בשנוי‬
‫תחתיו עד שהוא מגיע לארץ ׃‬
“He that makes a pile of fire on a holy day, when he is arranging the
wood, is not to lay one piece upon another, so as to make an orderly
arrangement, for that looks as if he were building; and although it be
an accidental building it is unlawful. But either he is to scatter the
wood in confusion, or to arrange them with some variation. How so?
He is to lay one piece at the top, and another piece under it, and
another under that, until it reaches the ground.” (Hilchoth Jom. Tov.
c. iv. 14.) In like manner the pot is not to be placed upon stones, or
whatever else is to support it, but is to be held up, and the support
placed under it; and so with other things. The great principle is, that
some difference is to be made between the work done on the holy
day and on a common day, and therefore in the carrying of wine, or
wood, or other things, they are not to be carried in a basket, nor as
usual, but on the shoulder or in some extraordinary way. Now, as the
speculations of men who had not much to do, or who chose to
devote the powers that God had given them to such minutiæ, these
things hardly appear as harmless; but when imposed as a burden
upon the consciences of others, they are utterly unjustifiable, and if
they were found in the New Testament, they would furnish abundant
matter for Jewish wit and ridicule. They would naturally say, what, is
this the religion that the Messiah came to teach? Had he nothing
better to do than to look after the making of fires, and the putting on
of pots? But this is not the religion of Jesus of Nazareth, nor of his

You might also like