Performance Tuning Webservices in Dynamics 365 Business Central: Utilize Read-Scale Out

By Jake Oetinger | July 7, 2022

Are you reading data from Business Central using web services? Use Read Scale-Out for better system performance!

As of Business Central 2020 release Wave 1, we can now utilize the Read Scale-Out feature in Azure SQL Database and SQL Server.

Read-Scale-Out uses the capacity of a read-only replica database instead of sharing a processing database. This way, read-only workloads like reports, queries, and API pages, are isolated from the primary read-write workloads. Your outside integrations that need to read data won’t consume resources or affect the performance of business processes inside of Business Central.

These features will equip your Business Central environment with the horsepower it needs to process transactions or return results on in-application reports or navigation. It will also ensure all inapplicable data isn’t processed unless you need it to be.

Read-only workloads will run on a dedicated database and their performance will improve by reducing the load on your primary database. Making the following changes to access data in Business Central ensures your primary database has full capacity for day-to-day business operations.

The Multiple Ways to Utilize Read-Scale Out in Dynamics 365 Business Central

The following are examples of changes to webservices configuration you can test in a sandbox if you are looking to alleviate strain on your environment. If you have questions about specific configuration changes or impacts, please reach out to our client services team.

Read-Scale Out in Dynamics 365 Business Central Data Access Intent List

Change the Access Intent in Business Central

Read-Scale Out in Dynamics 365 Business Central Filter List

Set the Data Access Intent in the pages properties

This is great if you are creating a custom webservice page.

Read-Scale Out in Dynamics 365 Business Central Create Custom Web page

Change the HTTP Request Header

As of Business Central 2021 release Wave 2, developers can change data access intent from the HTTP request header.

Here is an example using Postman:

Read-Scale Out in Dynamics 365 Business Central HTTP Request Header

PRead-Scale Out in Dynamics 365 Business Central Data Access Intent

Whether you need a specific set of data to present, or want to limit the amount of clutter in your system by separating data sets into their own read-only documents, these features can help you streamline that process.

Using Application Insights?

Application Insights is a diagnostic tool you can use to determine why your Dynamics 365 Business Central system is behaving a certain way.

This can include gathering information on extensions, diagnosing a slow-down in processing, or giving you a view of the traffic and data running through your system.

In this scenario, you can use event ID RT0008 to view incoming web service telemetry data. Using the sample query below, in conjunction with Application Insights, can help you utilize this feature.

Read more about Application Insight RT0008 here.

Sample Query

traces
| where timestamp > ago(60d)
| where customDimensions.aadTenantId == ‘YOUR AAD ID HERE’ and isnotempty( ‘YOUR AAD ID HERE’)
| where customDimensions.environmentName == ‘YOUR ENVIRONMENT NAME HERE’ and isnotempty( ‘YOUR ENVIRONMENT NAME HERE’)
| where customDimensions.alObjectType <> ”
| where customDimensions.eventId == “RT0008”
//| where toupper(customDimensions.category) contains “API” //Change category to filter on the web service category “API”, “ODATA”, “SOAP”
| extend _processingTimeMS = toreal(totimespan(customDimensions.serverExecutionTime))/10000
| project
[“Timestamp”] = timestamp,
[“Category”] = toupper(customDimensions.category),
[“Endpoint”] = tostring(customDimensions.endpoint),
[“Object Type”] = tostring(customDimensions.alObjectType),
[“Object No.”] = tostring(customDimensions.alObjectId),
[“Object Name”] = tostring(customDimensions.alObjectName),
[“Processing Time”] = _processingTimeMS,
[“Publisher”] = tostring(customDimensions.extensionPublisher),
[“Extension Name”] = tostring(customDimensions.extensionName)
| sort by [“Timestamp”] desc

Questions?

We have a team of Business Central experts ready to assist you! Please get in touch with us if you have any questions.

Related Posts

Start the Conversation

It’s our mission to help clients win. We’d love to talk to you about the right business solutions to help you achieve your goals.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X