Comments (2)
To be clear, the reason one primitive can slow down other primitives when sharing a client is because a read-heavy primitive that uses SEQUENTIAL
read consistency can block command/query responses from a leader in sequencing until a sequential response is received, which often has to wait for entries from the leader since that client has seen recent indexes in other primitives.
from copycat.
I have been looking in to the idea a bit more tonight, and I think it could be hugely beneficial for both stability and performance. Essentially, this idea evolved out of investigating the thread model in ONOS. What I realized was that the same arguments I made about the threading model in ONOS should apply inside the Copycat client as well. Namely, that we can only guarantee order within a single thread, so the Copycat client is imposing unnecessary overhead on one thread when it has to wait for sequencing for operations that occur another thread.
So, what I'm interested in doing is creating a thread-aware client where it treats each thread as a separate logical session. A logical session adds no overhead - all sessions within a client are still managed with a single register request and keep-alives are shared - but request/response/event sequencing occurs independently of all other sessions, and each logical session appears as a separate session to state machines as well. Each primitive would then use the new thread model to use a specific logical session.
All this would really do is extend ONOS's primitive thread model into Copycat all the way down to the transport layer. That means it would take much better advantage of Netty's concurrency. But more importantly for fault tolerance, it would isolate failures in one thread/primitive from failures in other threads/primitives. For example, if a map put
command in one thread gets lost and has to be resent in order to fix sequencing in the cluster, that lost command won't affect/block e.g. a leader election command in another thread until resequencing is complete. It also means sequencing of responses and events will happen independently, so a primitive that's waiting for an event from a follower doesn't block a response from a leader. From what I've seen in the logs, I think this will have a huge impact when the cluster is under high load.
from copycat.
Related Issues (20)
- Support concurrent access of logs
- Remove indexing in logs
- Relax threading model in transports
- Remove serialization
- Create state machine test framework
- Support relaxed client consistency models
- Use unique node identifiers HOT 2
- Catch up joining nodes in the PASSIVE state before promotion to ACTIVE HOT 1
- question for performance HOT 4
- Join request from leader is proxied back to itself
- Leader election sends LEADER state change event twice
- New leader triggers onLeave event
- Use trace log level for requests/responses
- Don't submit unnecessary keep-alives
- Nodes can't communicate over the internet HOT 1
- copycat 1.2.4 server fails build test HOT 2
- question about pessimistic case HOT 1
- Under certain disconnection circumstances, the copycat-client-io thread takes 100% CPU HOT 3
- ServerCommit GC Warning
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 copycat.