[英]Increase performance of ASB reads/writes from Service Fabric application
I'm looking to increase the throughput of a process (API Controller) that runs on Service Fabric.我希望增加在 Service Fabric 上运行的进程(API 控制器)的吞吐量。 I have set the Service Fabric configuration to scale to the max number of instances configured in the Scale set.
我已将 Service Fabric 配置设置为扩展到规模集中配置的最大实例数。 Let's say there are 10 instances of the API controller waiting for requests now.
假设现在有 API controller 的 10 个实例在等待请求。 Every request is processed and sends a message to an ASB topic.
每个请求都会被处理并向 ASB 主题发送一条消息。 What configuration is suggested (sessions, prefetch, etc.) so that each service can submit as many messages to the ASB Topic as possible?
建议使用什么配置(会话、预取等)以便每个服务可以向 ASB 主题提交尽可能多的消息?
The guidance for this is well documented here .这方面的指导在此处有详细记录。
To increase the overall send rate into the queue, use multiple message factories to create senders.要提高进入队列的总体发送速率,请使用多个消息工厂来创建发件人。 For each sender, use asynchronous operations or multiple threads.
对于每个发送者,使用异步操作或多线程。
Sessions negatively affect performance, as they guarantee order.会话会对性能产生负面影响,因为它们保证了顺序。
Prefetch is for receivers only.预取仅适用于接收器。
Keep in mind the there are rate limits .请记住有速率限制。
Using higher SKU's increases rate limits.使用更高的 SKU 会增加速率限制。
Use the AMQP protocol使用 AMQP 协议
Re-use the message sender object再次使用消息发送者 object
Make sure to read the first link, as it contains more context.请务必阅读第一个链接,因为它包含更多上下文。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.