如何测试一个SOAP接口(SOAP是函数调用原子)? [英] How to load test a SOAP interface (are SOAP function calls atomic)?

查看:646
本文介绍了如何测试一个SOAP接口(SOAP是函数调用原子)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个服务器提供了SOAP函数调用接口。
数以百计,也许是几千年,电脑调用该函数。
我需要在一台PC来加载测试这一点。

A server offers a SOAP function call interface.
Hundreds, perhaps a few thousand, of PCs call that function.
I need to load test this using a single PC.

目前,我只是有一个for循环。是不是不够好?如果没有我怎样才能让测试更逼真?

At the moment I just have a for loop. Is that good enough? If not how can I make the test more realistic?

我原以为线程的,但如果SOAP调用函数是原子那么,不买任何东西。即使是这样,也仍然只能是我的测试电脑上(每个CPU),一个活动主题。

I had thought of threading, but if the SOAP function call is atomic then that doesn't buy anything. Even if it does, there can still only be one active thread (per CPU) on my tester PC.

我希望这是明确的,请询问进一步的信息,如果没有。

I hope that is clear, please ask for further info if not.

什么是测试这一点的最好办法,模拟在一个多台PC?

What's the best way to test this, simulating many PCs on one?

更新,我使用VB防爆preSS 2008年。我不能相信,.NET是这样构成的,它会阻塞CPU为SOAP远程过程调用的时间...还是没有呢?

Update, I am using VB Express 2008. I can't believe that .NET is so constructed that it will block the CPU for the duration of a SOAP Remote Procedure Call ... or does it?

推荐答案

使用for循环,你可能只发放一个同步的请求。运行循环的螺纹可能会被阻塞,等待该响应。注意,这阻止该线程,而不是整个CPU,这可以由许多线程共享。因此,通过使用多个线程可以同时发出多个请求。

Using a for loop, you are probably only issuing one simultaneous request. The thread running the loop will likely be blocked, waiting for the response. Note that this blocks the thread, but not the entire CPU, which can be shared by many threads. Therefore, by using multiple threads you can issue multiple requests simultaneously.

现在,在服务器上的SOAP处理器可以是单线程的 - 这将意味着它只能同时处理1请求。这是不太可能 - 因为服务器架构是专为的没有的工作这种方式。希望你会不会发现这种情况。

Now, the SOAP handler on the server could be single-threaded - which would mean that it can only handle 1 request simultaneously. This is much less likely - as server frameworks are specifically designed to not work this way. Hopefully you'll not discover this is the case.

你有没有确定多少的同步的要求,你需要处理?根据不同的场景,10000活跃客户甚至一集只可产生10个并发请求。这将取决于呼叫的次数以及反应持续时间。请求速率(请求/秒),将决定你将能够可靠/准确地从一台计算机模拟所需的负载。

Have you determined how many simultaneous requests you need to handle? Depending on the scenario, even a collection of 10,000 active clients may only be generating 10 simultaneous requests. This will depend on the frequency of the calls as well as the response duration. The request rate (requests/sec) will determine if you will be able to reliably/accurately simulate the desired load from a single computer.

这篇关于如何测试一个SOAP接口(SOAP是函数调用原子)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆