Giter Site home page Giter Site logo

evaluate and use fasthttp about gotling HOT 8 OPEN

eriklupander avatar eriklupander commented on July 3, 2024
evaluate and use fasthttp

from gotling.

Comments (8)

eriklupander avatar eriklupander commented on July 3, 2024

Sounds great. Assigned the issue to you if you want to give it a shot.

HTTP performance have been quite good so far, on my laptop (OS X) I usually run out of file handles before the CPU usage goes above 100% on a single core. But having less CPU usage due to HTTP implementation overhead sounds good.

Regarding memory use, I've seen pretty consistent behaviour where Gotling uses about 8 kb (each goroutine) x number of concurrent "users".

from gotling.

missedone avatar missedone commented on July 3, 2024

sure, will have a try later

from gotling.

missedone avatar missedone commented on July 3, 2024

i just pushed the initial implementation with fasthttp on feature/fasthttp branch.
for now, only GET is supported, i did a quick test, and found that there is performance degradation with fasthttp compared to stdlib net/http.
will dig deeper later to understand why.

below is an example, you can uncomment the client: fasthttp line to use fasthttp, by default it's using net/http:

---
iterations: 10
users: 10
rampup: 10
actions:
  - http:
      title: Ping Google
      method: GET
      # client: fasthttp
      url: https://www.google.com

from gotling.

eriklupander avatar eriklupander commented on July 3, 2024

Thanks, awesome work. Did you get the performance issue sorted out?

from gotling.

missedone avatar missedone commented on July 3, 2024

nope, even i use the lock-free approach for creating request/response object in commit: da3a8d5

i guess there still other lock/sync operation in fasthttp internal, will see.

from gotling.

missedone avatar missedone commented on July 3, 2024

i'd like to pend this since still fasthttp not perform as fast as net/http.

from gotling.

eriklupander avatar eriklupander commented on July 3, 2024

Ok, good work nevertheless.

from gotling.

jkpl avatar jkpl commented on July 3, 2024

Interesting work! :-) I wonder if sharing a single fasthttp client across multiple go-routines would help.

from gotling.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.