-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Support Read and Write Limitation on Hstore Backend #2658
Comments
Hi, @VGalaxies @imbajin I would love to hear your feedback on this feature. What do you think? |
This (issue) range is quite large, need time to discuss ~ And there are some similar operations designed and implemented in higher versions of PD, such as multiple groups to separate hot and cold data @dosu u can give your ideas and suggestions, as well as the current Store read and write overall generalization |
To address the feature request for implementing rate limiting in the Hstore backend, here are some ideas and suggestions: Current Mechanisms for Traffic ControlThe Hstore backend already includes mechanisms for traffic control using private final RateLimiter writeRateLimiter;
private final RateLimiter readRateLimiter;
final int writeLimit = config.get(CoreOptions.RATE_LIMIT_WRITE);
this.writeRateLimiter = writeLimit > 0 ? RateLimiter.create(writeLimit) : null;
final int readLimit = config.get(CoreOptions.RATE_LIMIT_READ);
this.readRateLimiter = readLimit > 0 ? RateLimiter.create(readLimit) : null; Handling High-Concurrency ScenariosThe system uses a private final ReadWriteLock storeLock = new ReentrantReadWriteLock(); When querying the store, a read lock is acquired to allow concurrent read operations: Lock readLock = this.storeLock.readLock();
readLock.lock();
try {
// Perform read operations
} finally {
readLock.unlock();
} Leveraging Higher Versions of PDHigher versions of PD include several modules that could be referenced or integrated for this feature. The Suggestions for Implementation
By leveraging the existing mechanisms and integrating advanced features from higher versions of PD, we can effectively implement rate limiting and traffic control in the Hstore backend. |
Feature Description (功能描述)
Each hstore server may be accessed by multiple graph servers, so we need to increase traffic control on the hstore side to protect the hstore server from being suspended due to too much traffic in high-concurrency scenarios
So, I want to implement rate limiting for read and write speeds in Hstore when CPU or memory reaches threshold levels.
The text was updated successfully, but these errors were encountered: