Comments (7)
Thanks for bringing this up as a discussion first.
Before adding any complexity like this, is there some real performance benefit for actual use cases?
from devpi.
It's hard to provide performance increase values without some kind of a benchmark.
Uvloop is faster than the built-in implementation - that's a fact confirmed by multiple sources over the web, it's even the recommended by modern ASGI servers (e.g. uvicorn). It reaches performance similar to Go, faster than NodeJS.
But how large of an impact it may have on Devpi is hard to say. It heavily depends on load distribution. The more mirrored packages accessed the bigger the speedup should be. Definitely would be higher if the main API was ASGI but with pyramid it's impossible AFAIK.
I strongly believe using those options is way less complicated than implementing replicas or requests-only workers. In my case mirror syncs were the main source of bottleneck from what I can tell - simple local package downloads were handled by nginx directly.
from devpi.
Oh. Didn't mention. Obviously, both uvloop and aiohttp speedups onlly help with parts of the stack. Bottleneck may be in other sections but hard to say without benchmarks.
from devpi.
I'm fairly certain that the other parts of devpi-server are the bottleneck for mirror speed. The async stuff only happens every 30 min per project, when the cache expires. So first step would be profiling actual load.
from devpi.
In my case it was a bursty load - at some point you got a CI pipeline or two making 5+ concurrent requests for various packages - many of them requiring a refresh.
Unfortunately I'm no longer able to profile it due to a migration to a different deployment structure.
from devpi.
I'd make uvloop an opt-in option not the default. Because as #998 uvloop is also written in C and would slow down support for new Python versions.
from devpi.
I like the approach used by both aiohttp and uvicorn - "use if installed, provide a single extra which installs them".
from devpi.
Related Issues (20)
- docs zip contains unwanted package source files HOT 3
- [client] upload `OSError: [Errno 18] Invalid cross-device link '/tmp/devpi-…/dist/….whl' -> 'dist/….whl'` HOT 2
- Cannot load packages when use base auth in gitlab registry mirror HOT 4
- Need help upgrading from 4.4.0 to current HOT 3
- Incorrect version given to doczip with devpi-client version 7.0.0 HOT 7
- All >400 HTTP responses from login provoke a SystemExit, not using fatal, and are not always fatal errors for login HOT 1
- Errors when sharing package files HOT 8
- Option to have the latest available documentation displayed, when a package has no docs HOT 2
- Support PEP 658 / PEP 714 HOT 8
- HTTP error 502 while retrieving a wheel file HOT 6
- Return HTTP 406 instead of HTTP 404 when `Accept` cannot be fulfilled HOT 4
- Support range requests when downloading files HOT 3
- Connection failures when downloading wheels HOT 6
- pytest-flake8 is abandoned
- Support for newer packaging HOT 2
- AttributeError: type object 'PersistentCurrent' has no attribute 'auth' HOT 3
- Mirroring fails for packages with hashes other than sha256 HOT 7
- Failed to upload tensorflow wheel with 400 error HOT 7
- Provide an aiohttp-less version for server HOT 15
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 devpi.