apr_socket_recv: Connection refused (111)
I've used libasync to my project, dub run is ok, but I benachmarked with apache ab tool , showing
Benchmarking localhost (be patient)...apr_socket_recv: Connection refused (111)
command : ab -n 100 -c 100 -k http://localhost:8081/index
how can I fixed that?
I think this benchmark would be more appropriate for vibe.d with libasync driver. Benchmarking libasync would be a little like benchmarking your kernel's accept, send or recv functions because it's really just an abstraction that puts you a function call away from those, and it's not doable using ab unless you're draining HTTP buffers because libasync isn't really equipped for that. You'd have to write the HTTP parser and buffers on top of it (which is, like writing a replica of vibe.d)
I want to write a lightweight web framework based on libasync It contains only request(http parser) route template and respone. but QPS is not high。 I want to use multi threads to fixed it,how can I do?
The best way to implement multi-threading would be on top of the request. You can start a new thread and process your request there. But I think you might be testing it wrong, but first what is the QPS? You should know that the apache bench isn't the best tool to test this out, you should probably use multiple machines over the network instead of the loopback
Sorry,it is not QPS . RPS is Requests per second.
I will need the source code and the operating platform to further assess this situation. There could be many reasons for a low throughput.
Can you give me IM tools account , I want to add you as a friend~
Yes, my skype is etcimon
How to use multi-threading with eventloop ,can you show me an example, thank you!
I would need some time to prepare this. Is there a reason why it wouldn't be preferable to use vibe.d with libasync driver?
I would like to know the whole framework, do not simply use someone else's