Coder Social home page Coder Social logo

Benchmark about bjoern HOT 7 CLOSED

jonashaag avatar jonashaag commented on June 3, 2024
Benchmark

from bjoern.

Comments (7)

jonashaag avatar jonashaag commented on June 3, 2024

bjoern is a server, not a framework.

from bjoern.

vmandke avatar vmandke commented on June 3, 2024

Is there something wrong with the way I have run Bjoern ? Benchmarking Gunicorn vs Bjoern with hello-world POST request.

http://stackoverflow.com/questions/41531707/bjoern-v-s-gunicorn-post-requests?noredirect=1#comment70269241_41531707

from bjoern.

jonashaag avatar jonashaag commented on June 3, 2024

What tool are you using for the benchmarks? Are you running them from the same host that the servers run on? Why are you using multiple workers for bjoern?

Don't expect huge differences in speed. Time spent in the web server will be roughly 5%, the other 95% is spent in your application code. For example if you make a single database query in your application code then the choice of web server simply doesn't matter anymore for performance.

from bjoern.

vmandke avatar vmandke commented on June 3, 2024

@jonashaag I am using Tsung for benchmarking
No, the tsung node and server nodes are different, however both have same configuration. Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-115-virtual x86_64)

Using two workers as there are 2 cores on the node.
The flask app simply returns the JSON it got from the POST request.

from bjoern.

jonashaag avatar jonashaag commented on June 3, 2024

I guess you're simply measuring network performance then, however I don't know what's wrong with your setup that you get such different request rates. I suggest you start your benchmarking with a simple hello world app.

from bjoern.

vmandke avatar vmandke commented on June 3, 2024

@jonashaag

the flask app I am using just does this:

from flask import Flask, request, jsonify

app = Flask(__name__)


@app.route('/suggest/', methods=['POST'])
def hello():
    content = request.get_json()
    return jsonify(**content), 200

from bjoern.

jonashaag avatar jonashaag commented on June 3, 2024

That's not hello world and you're not running the tests from the same node. Start with the simplest possible setup.

from bjoern.

Related Issues (20)

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.