- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2022 12:08 AM
Hello Devs,
I am having a hard time understanding how "Operational Toggles" work. I've read through the documentation Operational toggles (servicenow.com) and tried to re-create the exmaple on the Typeahead thingy to see how it is working.
- How do I set where *exactly* the toggle is running? What is the scope of a toggle?
- How does the system know if it's now "fully opearional" or if it's "slightly degraded"?
If anybody has any additional resources on the topic or if has some personal experience and could provide an example it would be highly appreciated.
Solved! Go to Solution.
- Labels:
-
Instance Configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2022 03:55 AM
I actually contacted ServiceNow support and this is the summary of what they told me:
- Creating a toggle for an application/scope does not automatically mean that anything is being throttled
- Throttling aspects only manifest themselves if the application is built to respond to the operational toggle level
- Each component within an application needs to be configured individually
- To make the component "respond" to the "Opertaional Toggle" and the current "System Run Level" you need to implement if/switch statements in your code
- The throttle "limit" is determined by the "System Run Level"
- The system does not make any automatic determinations regarding the Run Level that it is operating at. Automatic determination may be a future enhancement. The intention is for the system administrator to determine the appropriate level and set it based on their assessment of current conditions.
- Setting and fetching the current "System Run Level" can be done via the below API calls
- sn_run_level.GlideSystemRunLevel.switchLevel('slightly_degraded');
- sn_run_level.GlideSystemRunLevel.getCurrentLevel();
- Setting and fetching the current "System Run Level" can be done via the below API calls
- You need to implement a your own, custom logic so that you script's are responding to the current "System Run Level"
- Purely Server Side components are NOT a great candidate for throttling (i.e.: it would not make much sense to only execute a BR every Xth database operation, or it would not make much sense to not run a Scheduled Job, but theoretically both are possible)
- On the other hand, Client-Server communication suits the toggles better
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2022 03:55 AM
I actually contacted ServiceNow support and this is the summary of what they told me:
- Creating a toggle for an application/scope does not automatically mean that anything is being throttled
- Throttling aspects only manifest themselves if the application is built to respond to the operational toggle level
- Each component within an application needs to be configured individually
- To make the component "respond" to the "Opertaional Toggle" and the current "System Run Level" you need to implement if/switch statements in your code
- The throttle "limit" is determined by the "System Run Level"
- The system does not make any automatic determinations regarding the Run Level that it is operating at. Automatic determination may be a future enhancement. The intention is for the system administrator to determine the appropriate level and set it based on their assessment of current conditions.
- Setting and fetching the current "System Run Level" can be done via the below API calls
- sn_run_level.GlideSystemRunLevel.switchLevel('slightly_degraded');
- sn_run_level.GlideSystemRunLevel.getCurrentLevel();
- Setting and fetching the current "System Run Level" can be done via the below API calls
- You need to implement a your own, custom logic so that you script's are responding to the current "System Run Level"
- Purely Server Side components are NOT a great candidate for throttling (i.e.: it would not make much sense to only execute a BR every Xth database operation, or it would not make much sense to not run a Scheduled Job, but theoretically both are possible)
- On the other hand, Client-Server communication suits the toggles better