3

I am new to OpenCPU, I look at the documents at https://www.opencpu.org/, It looks that OpenCPU can process http requests concurrently? I ask so because R itself only has single-thread mode, and how many requests can it process concurrently?

Thanks.

Tom
  • 5,848
  • 12
  • 44
  • 104

1 Answers1

2

If you run the Apache based opencpu-server there is no limit to the number of concurrent requests. You can tweak the number of workers in the prefork settings.

The local single-user server in R on the other hand only uses a single R process. You can still make concurrent requests, but they will automatically be queued and processed one after the other.

One way or another, you shouldn't worry about it in the client.

Jeroen Ooms
  • 31,998
  • 35
  • 134
  • 207
  • Thanks @Jeroen for the helpful answer. Do you mean that there can be many concurrent requests( which will be queued up),and R has to process these requests one by one? If so, then if one request is a time consuming task, it will affect other requests. – Tom Jun 22 '17 at 07:43
  • It depends on if you run `opencpu-server` or the single user server. If you run `opencpu-server` all requests will be processed concurrently by apache. – Jeroen Ooms Jun 23 '17 at 21:48