大网数据广告活动
网络与域名解析

Miscellaneous RPC Performance Tips

· 52CE 我爱测

This section discusses miscellaneous performance tips for developing high performance RPC servers. This section provides many tips that refer to the RPC client. Developing an RPC client properly enables the RPC server to perform less work.

This section discusses miscellaneous performance tips for developing high performance RPC servers. This section provides many tips that refer to the RPC client. Developing an RPC client properly enables the RPC server to perform less work.

Use Kerberos

If security is used, use Kerberos. On the server side, Kerberos does not require access to the KDC. This moves the workload from the server to the client, which provides better performing servers.

Use Static Identity Tracking

If security is used, try to use static identity tracking. Static identity tracking is cheaper in terms of resource usage than dynamic identity tracking. If the client identity changes, and the server should not be aware of the change, use dynamic tracking instead of creating a different binding handle for each identity. But if the identity is the same, ensure RPC is aware of that fact to avoid having RPC make checks for changed identity every time.

Use the RpcGetAuthorizationContextForClient Function

If you need to check access in Windows XP, use the RpcGetAuthorizationContextForClient function. The resulting Authz contexts enables very fast access checks, which are efficiently cached by the RPC run time.

Do Not Modify the Token Unless Necessary

If dynamic identity tracking is used, do not modify the thread/process token unless absolutely necessary. Even if it is modified to settings it previously had, the token often is sufficiently different to the security system to trigger the establishment of a new security context.

Consider Mixed Mode Serialization for Context Handles

The default serialization mode for context handle is serialized (exclusive). Consider making all calls that do not modify the state of the context handle in shared serialization mode. See RpcSsContextLockExclusive for more information.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。