Understanding Discovery Optimization via IP Service AffinitySummary<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } 1. When the IP Service Affinity property (glide.discovery.ip_service_affinity) is enabled within your ServiceNow instance, it introduces a highly efficient shortcut to the post-scanning phases of infrastructure discovery. A common misconception is that this property alters the behavior of the initial Shazzam scanning engine. In practice, Shazzam continues to function normally: during every scheduled run, it performs a comprehensive, multi-threaded port scan across your targeted IP ranges to accurately identify every open port on a device.2. Shazzam does not restrict its scan to a single port, nor does it drop ports from its memory; it captures the complete digital footprint of the target device to ensure no network changes are missed.3. The actual performance optimization and time savings occur immediately after Shazzam finishes, specifically during the Device Classification phase. In a standard discovery configuration without affinity, if Shazzam reports that a device has multiple ports open (such as Port 22 for SSH, Port 23 for Telnet, and Port 161 for SNMP), the MID Server is forced to systematically cycle through classification probes for all of those protocols. If the system tests an incompatible protocol first, it must wait out the entire handshake connection timeout—which often takes 15 to 30 seconds per protocol—before moving to the next option. This sequential trial-and-error process heavily inflates total discovery execution times, consumes excess MID Server CPU resources, and frequently floods your system logs with harmless but distracting authentication errors.4. By activating IP Service Affinity, you eliminate this entire bottleneck. Once a device is successfully discovered and classified for the first time, ServiceNow records the winning protocol configuration in a dedicated affinity table (ip_service_affinity). On all subsequent discovery runs, Shazzam will scan all ports as usual, but the moment it verifies that the previously successful port is still open, the MID Server completely bypasses the standard multi-protocol testing sequence. Instead of knocking on every open door, ServiceNow immediately launches the single, registered classification probe that is already known to work for that specific asset. This targeted approach collapses the classification timeline from minutes of waiting on protocol timeouts down to just a few seconds of direct, successful communication, significantly accelerating your overall discovery schedules Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Enable IP Service Affinity for discovery