GithubHelp home page GithubHelp logo

spray-blocking's Introduction

Spray Blocking Requests

Update

NOTE: The whole premise of this test was flawed. I was testing by firing up 4 tabs in Chrome. For whatever reason Chrome was limited to 1 request per server (maybe that happens when it's a non-standard port, but doesn't matter the reason at this point). When I tried the same test in Safari and Chrome, I got the parallelism I was looking for.

The tests exhibit the same "problem", but I'm guessing without a specific config that's actually a matter of spray-testkit purposefully limiting parallelism for ease of debugging.

Overview

An example of blocking, sequential requests in Spray Routing (undesired behavior).

Our requests take 5 seconds to complete (scheduled with the Waiter Actor).

If you make multiple requests they'll "stack". So 4 requests will take 20 seconds to complete. This was unexpected behavior for me (at least in run mode outside of testing).

To reproduce the issue you can run a server:

sbt
> re-start

And then make multiple requests through your web-browser to http://localhost:9000/

Or you can run the tests:

sbt
> test

spray-blocking's People

Contributors

freedevz avatar

Watchers

 avatar  avatar

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.