ServiceNow Architecture & Design Principles: A Cheat Sheet for Architects
A comprehensive cheat sheet for ServiceNow architects covering platform fundamentals, design patterns, and best practices.
1. Platform Architecture Overview
ServiceNow is a cloud-based enterprise platform following a multi-instance architecture where each customer gets their own dedicated instance.
Core Architectural Layers
| Layer | Description |
|---|---|
| User Interface Layer | Forms, lists, portals, Service Portal, UI Builder/Next Experience |
| Application Layer | ITSM, ITOM, ITAM, CSM, HR apps built on the Now Platform |
| Business Logic Layer | Business Rules, Script Includes, Flows, Workflows |
| Data Layer | Tables, CMDB, relationships stored in MySQL/MariaDB |
| Integration Layer | REST/SOAP APIs, IntegrationHub, MID Servers |
Instance Architecture
┌─────────────────────────────────────────────────────────┐
│ ServiceNow Cloud │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ DEV │ │ TEST │ │ PROD │ │
│ │ Instance │──│ Instance │──│ Instance │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │ │ │ │
│ └────────────────┼────────────────┘ │
│ │ │
│ Update Sets / CI/CD │
└─────────────────────────────────────────────────────────┘Source: ServiceNow ESM Architecture Blueprint (opens in a new tab)
2. The 8 Pillars of ServiceNow Architecture
These foundational pillars guide scalable, secure, and maintainable platform design.
Pillar 1: Modularity & Reusability
"Build once, reuse everywhere"
- Design utilities and logic that serve multiple teams/use cases
- A well-built Script Include or Flow Action becomes a building block
- Reduces duplication, simplifies maintenance, accelerates development
Pillar 2: Security by Design
- Incorporate access control, data validation, and scoped logic from day one
- Use ACLs, roles, and security attributes as first-class citizens
- Prevent breaches and protect data integrity
Pillar 3: Scalability
- Design for future growth, not just current load
- Use async processes, queues, and efficient queries
- Support enterprise load with proper indexing strategies
Pillar 4: Observability
- Build visibility into systems: logging, traceability, error tracking
- Enable rapid debugging and compliance support
- Use System Logs, Transaction Logs, and Script Execution Tracker
Pillar 5: Business Alignment
- Reflect business services, owners, and processes in architecture
- Map technical solutions to business capabilities
- Use CSDM to connect IT to business outcomes
Pillar 6: Governance
- Establish clear change management processes
- Use update sets and source control for tracking customizations
- Define ownership and approval workflows
Pillar 7: Maintainability
- Write clean, documented code
- Follow naming conventions
- Avoid over-customization; prefer OOB solutions
Pillar 8: Performance
- Optimize queries and scripts
- Monitor and tune regularly
- Design for minimal database impact
Source: Build It the Right Way: The 8 Pillars (opens in a new tab) | BRY Framework (opens in a new tab)
3. Scoped Applications Architecture
When to Use Scoped Apps
| Scenario | Recommendation |
|---|---|
| Specific use case, won't interact with other apps | Create new scope |
| Needs to interact with platform/other apps | Evaluate existing scope |
| Reusable across instances or Store distribution | Create new scope |
| Global platform modification | Global scope (with caution) |
Scope Benefits
- Modularity: Package functionality as standalone module
- Isolation: Prevent variable/script name collisions
- Security: Control what's exposed to other scopes
- Reusability: Move between instances or publish to Store
- Governance: Manage changes, prevent accidental modifications
Best Practices
Namespace format: x_[vendor]_[app_name]
Example: x_acme_csm- Plan thoroughly before development—define required resources and data access
- Use scoped APIs for platform interaction
- Document cross-scope dependencies explicitly
- Test scope interactions before deployment
Source: Understanding Application Scope (opens in a new tab) | Background and Philosophy of Scoped Applications (opens in a new tab)
4. CMDB & CSDM Architecture
CSDM Framework Domains
┌─────────────────────────────────────────────────────────┐
│ CSDM FRAMEWORK │
├──────────────┬──────────────┬──────────────┬────────────┤
│ FOUNDATION │ DESIGN │ MANAGE │ SELL/ │
│ │ │ TECHNICAL │ CONSUME │
├──────────────┼──────────────┼──────────────┼────────────┤
│ • Locations │ • Business │ • Technical │ • Service │
│ • Users │ Apps │ Services │ Offerings│
│ • Groups │ • Business │ • CI │ • Requests │
│ • Companies │ Services │ Relationships│ • Catalog│
│ • Cost Ctrs │ • App Svcs │ • Discovery │ Items │
└──────────────┴──────────────┴──────────────┴────────────┘Implementation Approach: Crawl → Walk → Run
| Phase | Focus |
|---|---|
| Crawl | Foundation data (users, locations, business apps) |
| Walk | Service instances, relationships, technical services |
| Run | Advanced domains, full service modeling, automation |
CMDB Best Practices
- Follow CSDM schema for compatibility with ServiceNow analytics and upgrades
- Configure identification rules to avoid duplicate CIs
- Set up reconciliation rules to prioritize trusted data sources
- Use Service Graph Connectors for third-party tool integrations
- Schedule regular data quality checks using CMDB Health dashboards
- Establish CI ownership and validation rules
- Document customizations and obtain governance approval
Key Tables
| Table | Purpose |
|---|---|
cmdb_ci | Base CI table (parent of all CIs) |
cmdb_ci_service | Business/Technical Services |
cmdb_ci_appl | Applications |
cmdb_ci_server | Servers |
cmdb_rel_ci | CI Relationships |
Source: CMDB Design Guidance (opens in a new tab) | CMDB & CSDM Data Foundations (opens in a new tab)
5. Integration Architecture
Integration Pattern Decision Matrix
| Pattern | Use When | Pros | Cons |
|---|---|---|---|
| REST API | Real-time, synchronous needs | Clear contracts, predictable | Tight coupling |
| IntegrationHub Spokes | Pre-built connectors available | Fast implementation | Licensing cost |
| MID Server | On-prem systems behind firewall | Secure bridge | Additional infrastructure |
| Event-driven (EDA) | Decoupled, async processing | Scalable, loose coupling | Complexity |
| Stream Connect (Kafka) | High-volume, bidirectional streaming | Real-time, scalable | Kafka expertise needed |
MID Server Architecture
┌──────────────────┐ ┌──────────────────┐
│ ServiceNow │◄───────►│ MID Server │
│ Cloud Instance │ HTTPS │ (On-Premise) │
└──────────────────┘ └────────┬─────────┘
│
┌─────────────────┼─────────────────┐
│ │ │
┌─────▼─────┐ ┌──────▼──────┐ ┌─────▼─────┐
│ LDAP/AD │ │ Database │ │ Network │
└───────────┘ └─────────────┘ │ Devices │
└───────────┘When MID Server is Required:
- Discovery & Service Mapping
- Orchestration
- Integrating with on-prem systems
- JDBC connections to internal databases
IntegrationHub Best Practices
- Use Spoke Generator for OpenAPI 2.0/3.0 specs
- Group similar action steps to avoid environment switching
- Set MID Server selection via connection aliases
- Use credential aliases for secure credential management
- Implement retry logic for transient failures
Instance-to-Instance Integration
| Method | Use Case |
|---|---|
| Service Bridge | MSP/Provider-Consumer scenarios |
| Instance Data Replication (IDR) | Data synchronization across instances |
| Custom REST integration | Flexible, custom requirements |
Source: Integration Design Patterns (opens in a new tab) | IntegrationHub Spokes (opens in a new tab)
6. Security Architecture
ACL Evaluation Order (Performance Optimized)
1. Roles/Security Attributes ← FASTEST (use first)
↓
2. Data Conditions ← Use indexed fields
↓
3. Reference Controls
↓
4. Scripts ← SLOWEST (use last)ACL Types
| Type | Granularity | Use Case |
|---|---|---|
| Table ACL | Entire table | Broad access control |
| Field ACL | Specific field | Sensitive field protection |
| Row-level | Record conditions | Data segregation |
ACL Best Practices
- Start with roles — fastest security check
- Use non-contextual ACLs when possible (faster, easier to audit)
- Prefer indexed fields in conditions
- Shield scripts with roles/criteria — script only runs if conditions match first
- Merge ACLs that differ only by roles
- Test with impersonation — admins bypass ACLs
Role Management
┌─────────────────┐
│ itil_admin │ ← Higher-level role
└────────┬────────┘
│ inherits
┌─────────────┼─────────────┐
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│ itil │ │ change │ │ problem │
│ │ │ _manager│ │ _manager│
└─────────┘ └─────────┘ └─────────┘Principles:
- Least privilege: Users get only needed permissions
- Assign roles to groups, not individual users
- Audit regularly: Review permissions quarterly
- Document custom roles: Purpose, permissions, owners
Security Configuration Checklist
- High Security Plugin enabled
- Session timeout configured appropriately
- IP address access controls for admin
- Two-factor authentication for privileged users
- ACLs on sensitive tables (sys_user, etc.)
- Encryption for sensitive fields
Source: Configuring ACLs the Right Way (opens in a new tab) | ServiceNow Security Best Practices (opens in a new tab)
7. Performance Optimization
GlideRecord Best Practices
| Do | Don't |
|---|---|
✅ Use addQuery() with indexed fields | ❌ Query without filters |
✅ Use addEncodedQuery() for complex queries | ❌ Chain many addQuery()/addOrCondition() |
✅ Use GlideAggregate for counts | ❌ Use getRowCount() |
✅ Select only needed fields with setLimit() | ❌ Fetch all columns when only need sys_id |
| ✅ Use async for heavy operations | ❌ Nested loops with GlideRecord |
Server-Side Optimization
// BAD: Fetches all columns, no filter
var gr = new GlideRecord('incident');
gr.query();
while (gr.next()) {
/* ... */
}
// GOOD: Filtered, limited, uses encoded query
var gr = new GlideRecord('incident');
gr.addEncodedQuery('active=true^priorityIN1,2');
gr.setLimit(100);
gr.query();
while (gr.next()) {
/* ... */
}
// BEST for counts: Use GlideAggregate
var ga = new GlideAggregate('incident');
ga.addQuery('active', true);
ga.addAggregate('COUNT');
ga.query();
if (ga.next()) {
var count = ga.getAggregate('COUNT');
}Client-Side Rules
- Never use client-side GlideRecord — use GlideAjax instead
- Avoid
g_form.getReference()— fetches all fields - Use asynchronous patterns for server calls
- Minimize DOM manipulation — use GlideForm API
Performance Monitoring Tools
| Tool | Purpose |
|---|---|
| SQL Debugging | Analyze slow queries |
| Script Execution Tracker | Track script execution times |
| Slow Query Logs | Identify problematic queries |
| Transaction Logs | Monitor request/response times |
| Instance Scan | Identify performance issues |
Async Processing Patterns
// Use Event Queue for async processing
gs.eventQueue(
'x_custom.heavy_process',
current,
current.sys_id,
current.number
);
// Scheduled Jobs for batch operations
// Configure via System Definition > Scheduled JobsSource: Performance Considerations with GlideRecord (opens in a new tab) | Beyond Best Practices: Time & Space (opens in a new tab)
8. High Availability & Instance Performance
ServiceNow's HA Architecture
ServiceNow operates a fully managed HA infrastructure. As an architect, understand what's automatic vs. what you influence.
| Layer | ServiceNow Manages | You Influence |
|---|---|---|
| Data Center | Multi-DC redundancy, geo-failover | Data residency selection |
| Database | Clustering, replication, backups | Query efficiency, indexing requests |
| Application Nodes | Load balancing, auto-scaling | Code efficiency, async patterns |
| Network | CDN, DDoS protection, TLS | MID Server placement, integration design |
Automatic HA Capabilities
- Active-Active Data Centers: Production instances run across multiple availability zones
- Automatic Failover: Database and application tier failover without customer intervention
- Zero-Downtime Upgrades: Rolling upgrades across node clusters
- Hourly Backups: Point-in-time recovery (35-day retention for production)
Key Insight: You cannot configure HA directly—it's baked in. Your job is to not defeat HA through poor design (e.g., single MID Server dependencies, synchronous blocking calls).
Instance Performance Levers
What architects can control to maximize performance:
| Lever | Strategy |
|---|---|
| Indexing | Request indexes for frequently filtered/sorted fields via HI case |
| Semaphores | Throttle concurrent heavy operations to prevent resource exhaustion |
| Scheduled Jobs | Stagger timing; use off-peak windows for batch processing |
| Table Rotation | Archive old data (task tables grow fast) |
| Domain Separation | Limit domains—excessive domains degrade query performance |
| Clone Scheduling | Clone during low-usage periods |
Performance Monitoring Strategy
┌─────────────────────────────────────────────────────────────┐
│ MONITORING LAYERS │
├──────────────────┬──────────────────┬───────────────────────┤
│ PROACTIVE │ REACTIVE │ DIAGNOSTIC │
├──────────────────┼──────────────────┼───────────────────────┤
│ • Instance Scan │ • Slow Query Log │ • Session Debug │
│ • Performance │ • Transaction │ • SQL Debug │
│ Homepage │ Quota Exceed │ • Script Execution │
│ • Scheduled │ • Error Logs │ Tracker │
│ Health Checks │ • PA Dashboards │ • Debug Business Rule │
└──────────────────┴──────────────────┴───────────────────────┘Key Performance Metrics to Monitor
| Metric | Target | Where to Find |
|---|---|---|
| Transaction Response Time | < 1 second (avg) | Performance Homepage |
| Long-Running Transactions | < 0.1% of total | Transaction Logs |
| Slow Queries | 0 critical | Slow Query Logs |
| Semaphore Waits | Minimal | System Diagnostics |
| Scheduler Backlog | Near zero | Scheduled Job Dashboard |
| Memory Utilization | < 80% | Stats.do |
Capacity Planning Guidelines
| Factor | Planning Consideration |
|---|---|
| User Concurrency | Estimate peak concurrent users; provision accordingly |
| Integration Volume | Map peak API call rates; design for 3x expected load |
| Data Growth | Project table growth; implement archival before problems |
| Scheduled Load | Audit job schedules; eliminate conflicts and clustering |
| Seasonal Peaks | Document business cycles; engage ServiceNow for capacity events |
Load Testing Approach
1. Identify Critical Paths → Catalog items, searches, dashboards
↓
2. Create Realistic Scripts → Simulate actual user journeys
↓
3. Test Non-Production First → Never load test production
↓
4. Gradual Ramp-Up → Start small, increase load incrementally
↓
5. Monitor During Test → Watch Transaction Logs, memory, semaphores
↓
6. Analyze & Tune → Address bottlenecks before go-liveWarning: Load testing production requires explicit ServiceNow approval and coordination. Contact your TAM or support before attempting.
Common HA/Performance Anti-Patterns
| Anti-Pattern | Why It's Bad | Fix |
|---|---|---|
| Single MID Server | Single point of failure for discovery/integrations | Deploy MID cluster with load balancing |
| Synchronous integrations for non-critical paths | Blocks user transactions | Use async (events, IntegrationHub async) |
| Unindexed query in Business Rule | Scales poorly as table grows | Request index or redesign query |
Heavy operations in before Business Rules | Delays user save | Move to async or after when possible |
| No data archival strategy | Tables grow indefinitely; queries slow | Implement table rotation policies |
| Scheduled job pile-up | Jobs compete for resources at same time | Stagger schedules; use priority queues |
MID Server HA Configuration
┌─────────────────────────────────────────────────────────────┐
│ MID SERVER CLUSTER │
│ │
│ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
│ │ MID 1 │ │ MID 2 │ │ MID 3 │ │
│ │ (Active) │ │ (Active) │ │ (Standby) │ │
│ └─────┬─────┘ └─────┬─────┘ └─────┬─────┘ │
│ └────────────────┼────────────────┘ │
│ ▼ │
│ MID Server Cluster (Load Balanced) │
│ Auto-failover if node fails │
└─────────────────────────────────────────────────────────────┘Best Practices:
- Minimum 2 MID Servers per cluster for HA
- Place MIDs in different network zones/data centers
- Use MID Server cluster for Discovery, Orchestration, IntegrationHub
- Monitor MID health via MID Server Dashboard
Source: ServiceNow High Availability (opens in a new tab) | Performance Best Practices (opens in a new tab) | Instance Performance Diagnostics (opens in a new tab)
9. Flow Designer Architecture
Component Hierarchy
┌─────────────────────────────────────────┐
│ FLOW │
│ ┌─────────────────────────────────┐ │
│ │ SUBFLOW │ │
│ │ ┌───────────┐ ┌───────────┐ │ │
│ │ │ ACTION │ │ ACTION │ │ │
│ │ └───────────┘ └───────────┘ │ │
│ └─────────────────────────────────┘ │
└─────────────────────────────────────────┘
Flow = Trigger + Logic + Actions/Subflows
Subflow = Reusable composite logic (no trigger)
Action = Single-purpose atomic operationBest Practices
| Principle | Implementation |
|---|---|
| Keep flows short | < 25 actions; use subflows for larger |
| Subflows for reuse | Build once, reference everywhere |
| Pass references | One reference variable vs. many individual values |
| Use data pills | Avoid hardcoding values in scripts |
| Decision tables | Replace complex if/else branching |
| Categorize | Tag flows/subflows/actions for discoverability |
Flow Designer vs. Workflow
| Feature | Flow Designer | Workflow |
|---|---|---|
| Recommended for | New development | Legacy support |
| Scripting needed | Minimal | Often required |
| Reusability | Actions, Subflows | Activities |
| Testing | Built-in test feature | Manual |
| Performance | Optimized | Variable |
Error Handling Strategy
┌─────────────────────────────────────┐
│ MAIN FLOW │
│ │
│ ┌────────────────────────────────┐ │
│ │ SUBFLOW with Error Handler │ │
│ │ │ │
│ │ Try: [Action 1] → [Action 2] │ │
│ │ ↓ error │ │
│ │ Catch: [Log] → [Notify] │ │
│ └────────────────────────────────┘ │
│ │
│ Flow continues even if subflow fails│
└─────────────────────────────────────┘Source: Best Practices for Flow Designer (opens in a new tab) | Flow Designer Architecture Overview (opens in a new tab)
10. Instance Strategy & Domain Separation
Multi-Instance Decision Framework
| Factor | Single Instance | Multiple Instances |
|---|---|---|
| Same processes, same data | ✅ Preferred | ❌ Avoid |
| Legal/geographic data requirements | Domain Separation | ✅ May be required |
| Completely separate entities | ❌ Not suitable | ✅ Consider |
| Heavy integration/sync needs | ✅ Preferred | ⚠️ High cost |
| Sensitive data, restricted visibility | Domain Separation | ✅ May be required |
Key Rule: "You cannot run the same process on the same data in multiple instances."
Domain Separation Overview
┌─────────────────────────────────────────┐
│ SINGLE INSTANCE │
│ ┌───────────┐ ┌───────────┐ │
│ │ Domain A │ │ Domain B │ │
│ │ • Data │ │ • Data │ │
│ │ • Config │ │ • Config │ │
│ │ • Users │ │ • Users │ │
│ └───────────┘ └───────────┘ │
│ │ │ │
│ └──────┬───────┘ │
│ ▼ │
│ Global Domain │
│ (Shared configurations) │
└─────────────────────────────────────────┘When to Use Domain Separation
✅ Good fit:
- MSPs with multiple customers
- Controlling external fulfiller access
- Multi-tenant requirements
- Enterprise with distinct business units
❌ Avoid when:
- Need complete separation of system properties
- Global reporting not required
- Simpler to manage separate instances
Domain Separation Considerations
| Aspect | Impact |
|---|---|
| Setup | Must be enabled in new instance; cannot be removed |
| Maintenance | Substantially increases administrative work |
| Performance | Too many domains slow database queries |
| Complexity | Requires careful planning and expertise |
Source: Multi-Instance Architecture Decision (opens in a new tab) | Domain Separation Architecture (opens in a new tab)
11. Deployment & CI/CD
Deployment Pipeline
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
│ DEV │───►│ QA │───►│ UAT │───►│ PROD │
└────┬────┘ └────┬────┘ └────┬────┘ └─────────┘
│ │ │
▼ ▼ ▼
Develop ATF Tests User Acceptance
& Test Code Scan Final ApprovalUpdate Sets vs. Source Control
| Aspect | Update Sets | Source Control (App Repo) |
|---|---|---|
| Version control | Limited | Full Git capabilities |
| Merging | Manual collision handling | Git merge/branch |
| Recommended for | Legacy, simple changes | Scoped apps, CI/CD |
| CI/CD integration | Basic | Full pipeline support |
ATF (Automated Test Framework) Best Practices
- Create ATF tests in dedicated scoped app (e.g., "Incident ATF Tests")
- Run ATF before deployment — fail pipeline if tests fail
- Cover critical paths: Catalog items, flows, business logic
- Use parameterized tests for data-driven testing
- Include cleanup in test teardown
CI/CD Integration Options
| Tool | Description |
|---|---|
| ReleaseOps | Native ServiceNow deployment control (no extra licensing) |
| GitHub Actions | ServiceNow CI/CD integration (community supported) |
| Jenkins Plugin | ServiceNow CI/CD plugin |
| Azure DevOps | Pipeline integration via APIs |
Deployment Checklist
- Update set completed in DEV
- ATF tests pass
- Instance Scan clean (no critical issues)
- Code review completed
- Documentation updated
- Rollback plan documented
- Approvals obtained
- Preview update set (check collisions)
- Deploy during maintenance window
- Post-deployment validation
Source: ReleaseOps (opens in a new tab) | CI/CD with ATF (opens in a new tab)
12. Design Patterns Quick Reference
Creational Patterns
| Pattern | ServiceNow Use Case |
|---|---|
| Singleton | Script Includes with shared state |
| Factory | Creating different record types based on input |
| Builder | Complex GlideRecord query construction |
Structural Patterns
| Pattern | ServiceNow Use Case |
|---|---|
| Adapter | Wrapping external APIs for platform use |
| Facade | Script Include exposing simplified API |
| Decorator | Extending Business Rule functionality |
Behavioral Patterns
| Pattern | ServiceNow Use Case |
|---|---|
| Observer | Business Rules reacting to record changes |
| Strategy | Different assignment algorithms based on criteria |
| Template Method | Base Script Include with overridable methods |
Source: 23 ServiceNow Design Patterns (opens in a new tab) | Introducing Design Patterns (opens in a new tab)
13. Quick Reference: Do's and Don'ts
✅ Do
- Use OOB features before custom development
- Follow CSDM for CMDB modeling
- Create scoped applications for custom functionality
- Use Flow Designer for new workflows
- Write reusable Script Includes
- Test with ATF before deployment
- Document all customizations
- Use async processing for heavy operations
- Apply least privilege for access control
- Monitor performance regularly
❌ Don't
- Modify OOB tables/scripts directly
- Use global scope for custom apps
- Write client-side GlideRecord queries
- Skip ACL testing (always impersonate)
- Create complex nested business rules
- Ignore update set collisions
- Deploy without testing
- Over-customize when OOB works
- Use hardcoded values in scripts
- Neglect documentation
Additional Resources
Official Documentation
- ServiceNow Docs (opens in a new tab)
- ServiceNow Developer Portal (opens in a new tab)
- Now Learning (opens in a new tab)
Community Resources
- ServiceNow Community (opens in a new tab)
- Best Practices Portal (opens in a new tab)
- ESM Architecture Blueprint (opens in a new tab)
Certifications
- Certified Implementation Specialist – Data Foundations (CMDB & CSDM)
- Certified Application Developer
- Certified Technical Architect (CTA)
If you're preparing for any of these, SNReady (opens in a new tab) offers practice questions generated from official Now Learning content across 19 ServiceNow certification exams, with detailed explanations for each answer.
Last updated: January 2026