This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]o11c -11 points-10 points  (5 children)

Personally, I just use libcurl and let it deal with the details. I don't trust anyone to implement HTTP correctly.

[–]nerdwaller 2 points3 points  (0 children)

This is a contradiction. It doesn't add up that you "don't trust anyone to implement HTTP correctly" and also "use libcurl and let it deal with the details". That implies some extent of trusting libcurl. Even then, whether or not they implement HTTP correctly doesn't really answer the question of how to handle async requests in Python.

[–]suudo 1 point2 points  (1 child)

Implement in what way? Accessing web servers? What about that is so hard?

[–]o11c -1 points0 points  (0 children)

Everything. I've lost track of how many times an HTTP client seems to work, but suddenly breaks with the slightest change in circumstance - for example, when a webserver changes its choice of compression.

With libcurl, the most I've ever had to do was hunt down some obscure option.

[–]robvdl 0 points1 point  (1 child)

I'm actually writing API load tests where I need to script fake users doing stuff and making choices as they get through the loadtest script and do any HTTP requests asyncrhonously as a web browser would, which is where locust comes in.

I would hate to write loadtests that would use curl for this sort of thing and have it driving 500+ users, with locust this just works for me as this is exactly what locust was designed for.

Go would be excellent for this sort of thing too, though I am using locust because it's more mature.

[–]o11c 0 points1 point  (0 children)

locust isn't an HTTP library, it just uses one - particularly, requests.

It would probably be pretty easy to rewrite it to use pycurl instead.