Comments (7)
Can you give steps to reproduce this? I'm not seeing it in my own testing.
from python-receptor.
@ghjm I am using the receptor_http plugin to hit a web server that sleeps for 10 seconds on each request that it receives. I am using the receptor-controller to send multiple (10 for example) work requests down to the receptor node. The work requests simply hit the web server and block for 10 seconds. You can see that only one request is dispatched at a time. The spin loop will be triggered and the cpu usage will climb.
from python-receptor.
This is the simple sleepy web server that I'm using:
`
import asyncio
from aiohttp import web
async def hello(request):
print("got a request..")
await asyncio.sleep(10)
print("awake returning...")
return web.Response(text="Hello, world")
app = web.Application()
app.add_routes([web.get('/', hello)])
web.run_app(app, port="9000")
`
from python-receptor.
Thanks, @dehort - and we're confident this isn't the Controller only dispatching one at a time? It can be reproduced with receptor send
from commandline?
from python-receptor.
@j00bar I'm pretty confident that this is not the controller. i can see where all the messages are sent to the receptor node at roughly the same time. It looks like receptor reads the messages off of the connection and adds them to the queue. They sit in the queue while the work request is processed.
from python-receptor.
This is what I'm using to test:
for a in {1..10}; do receptor send --directive receptor_http:execute foo '{"url": "http://localhost:9000", "method": "GET"}' & done
I see requests being executed in parallel, on both the devel
and release_0.5
branches. I have not yet been able to observe the serialization behavior you're describing.
from python-receptor.
Closing for #167
from python-receptor.
Related Issues (20)
- Receptor exits with zero when unable to listen
- Wrong error message when incorrect --listen specified
- KeyError: 'ws_extra_headers' in Receptor 0.6 HOT 2
- Need for HTTP proxy support HOT 13
- Receptor doesn't fail gracefully when the data directory is not writable HOT 1
- Better CLI usage information output
- Use a different library for websockets connections HOT 2
- Write docs for end-user usage
- part of nodes gets disconnected (and not reconnects) when running big stresstest HOT 10
- Unicode 'invalid start byte' error sometimes HOT 3
- Connection manifest will drop connections after 24 hours HOT 2
- Proposal: Replace ephemeral nodes with a unix socket HOT 2
- Receptor ping --count 0 implies --delay 0 HOT 4
- Add a keepalive or ping/pong to the websocket connection HOT 4
- Worker.unregister() calls receptor.remove_connection() even if the remote node was not registered HOT 1
- Nodes should always advertise after seeing a new epoch
- Receptor prints Python tracebacks when it ought to print human-friendly error messages HOT 4
- Response registry is not persisted to disk
- Receptor can be run with nonexistent config specified HOT 1
- Unable to install/configure receptor plugin because of package dependency issue.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-receptor.