Share via


Specifying Distributor Settings

Each computer that runs the notification engine (typically using an NS$InstanceName Windows service) can run a distributor. When you define an application, you define one or more distributors, which computers run those distributors, and operational settings for those distributors.

Distributor Processing

The distributor governs notification formatting and delivery for a notification application. On a configurable interval, called a distributor quantum, the distributor looks for a group of notifications, called a work item, to process. If a work item is available, the distributor acquires the work item, calls the content formatter to transform the notification data, and then sends the formatted notifications using a delivery protocol.

Notifications that could not be distributed are returned to the pool of work items. If there is a retry schedule for the notifications, and if the notifications have not expired, the distributor will attempt to process the notifications at the next retry interval.

Defining Distributors

In SQL Server Enterprise Edition, Developer Edition, and Evaluation Edition, your application can have multiple distributors. This can be beneficial if your application does complex formatting or is high volume.

Each distributor performs the same functions, but using multiple distributors can improve content formatting and delivery performance by sharing the processing load among servers.

If you define multiple distributors for your application, you must place them on different servers. There is no operational benefit to placing multiple distributors on one server. If you place two distributors from the same application on a single computer, Notification Services returns an error when you attempt to create or update the application.

If you are using SQL Server Standard Edition, your application can have only one distributor.

To monitor distributor performance, use the Notification Services generator and distributor performance objects. For more information, see Notification Services Performance Objects.

To define distributors for an application

If you are defining an application through XML, define distributors in the application definition file (ADF). If you are defining an application programmatically, use the Notification Services Management Objects (NMO) to define distributors.

Specifying Distributor Settings

When you define a distributor, you specify its operational settings, including the name of the system where the distributor runs, the number of threads available to the distributor, and how often the distributor looks for notifications.

To define a distributor

System Name

The system name property specifies the name of the system that runs the distributor. This value typically is the computer name. However, if the distributor is running on a failover cluster, this value is the virtual server name.

Notification Services client components must be installed on the computer and the instance must be registered on the computer.

If your application uses multiple distributors, each distributor must have a unique system name.

For more information about scaling-out an application, see Scale-Out Configurations.

To specify the distributor system name

Thread Pool Size

The distributor thread pool size specifies a maximum number of threads the distributor can use to process work items. The distributor can use fewer threads if there are fewer work items to process.

By default, the distributor uses all available threads to process work items in parallel. However, you can configure the thread pool size to control the number of threads available to the distributor.

For SQL Server 2005 Enterprise Edition, Developer Edition, and Evaluation Edition, the thread pool size is unlimited. If you do not define a thread pool size, or set the size to 0, Notification Services uses its own algorithm to determine the optimal number of threads.

Important

In SQL Server 2005 Standard Edition, the distributor thread pool size must be 1, 2, or 3. The default is 3.

Determining an Optimal Thread Pool Size

You can provide a low value if you want to limit the distributor's consumption of processor time on your system. If you lower the thread pool size, the distributor processes fewer work items in parallel, thereby decreasing the distributor's demand on system resources in high-volume scenarios.

To specify the distributor thread pool size

Distributor Quantum Duration

The distributor quantum duration specifies how frequently an idle distributor checks for work items. When the distributor is not idle, the distributor quantum becomes irrelevant because the distributor checks for additional work items when it begins and completes its current work item.

Note

The distributor quantum duration is independent of the generator quantum duration. For more information about the generator quantum, see Specifying the Generator Quantum Duration.

When configuring the distributor quantum duration, you can choose a short time, such as 20 seconds, or a longer time, such as 5 minutes. However, there is a trade-off between application speed and resource consumption.

  • If you configure a very short quantum duration, the application consumes more system resources. However, the distributor will be more responsive when a new work item becomes available after a period of idle time and subscribers are likely to receive notifications more quickly.
  • If you configure a longer quantum duration, the application will consume fewer system resources. However, there may be a delay between when the application generates the notification and when the distributor delivers the notification.

If your application cannot keep up with the distribution workload, consider adding distributors on separate servers. Scaling out an application requires SQL Server 2005 Enterprise Edition, Developer Edition, or Evaluation Edition.

To specify the distributor quantum duration

See Also

Concepts

Notification Services Performance Objects
Notification Formatting and Delivery Architecture

Other Resources

Defining Notification Services Applications

Help and Information

Getting SQL Server 2005 Assistance