Corvusoft / restbed

Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++14 applications.
http://www.corvusoft.co.uk
Other
1.92k stars 379 forks source link

Has anyone tested restbed performance? #393

Closed zhanb closed 4 years ago

zhanb commented 5 years ago

I wrote a hello world demo of GET method with restbed, and a hello world of GET method with nginx. I tested concurrency performance with ab tool, and found that the performance of restbed was several dozen times worse than that of nginx. I don't know if there's a problem with the method I'm using. Has anyone else tested restbed for performance?

GordonEldest commented 4 years ago

I won't try to use RestBed for replacing a HTTPD server. It's not the purpose of it but rather is a lib allowing to service very complexes request in a complex telco systeme (Like for Trading or Service desk, etc ...) Restbed is not really limited by network but by CPU /Thread organisation, and theses days it's not so much of an issue.

The differences are 1- Restbed require that you think yourself for everything; Caching/KeepAlive/Threading balancing But it also give you the capability to do it.

2- RestBed suffer form ASIO clutters. While it can be adressed and tuned that could be painful. Their roadmap expect to untight from it, that's an urgent matter.

IMHO your choice should be enlighted by why you need restbed for, and when restbed while remove ASIO dependency is it before or after your delivery date

(BTW I used Nginx as a FrontEnd for RestBed because I have issue linking RestBed with OpenSSL, but didn't found a better lib for REST) If you are Unix based consider https://github.com/oktal/pistache it's highly ranked, less sophisticated but more easy to thame

ben-crowhurst commented 4 years ago

https://github.com/binaryspaceship/cpp-rest-frameworks-benchmark