Skip to content
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

How to configure third type of entiry (say Locator) in addition to Server and Driver #2

Closed
rdiyewar opened this issue May 28, 2015 · 6 comments

Comments

@rdiyewar
Copy link

I want to benchmark our product using yardstick.
Our product have following entities:

  1. Locator - for clustor management and discovery, very few in number
  2. Server - stores data, scalable
  3. Client - performs user operation, Driver in case of yardstick

We can configure Server and Client, please let me know how to configure Locator member?

@niktikhonov
Copy link

Hi,
You can run your Locator together with Servers and use the same configuration object. You can add additional parameter like ordinal number of Server and run locator only for with even ordinal numbers. Please see https://github.com/yardstick-benchmarks/yardstick-ignite/blob/master/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java parameter "--nodeNumber".
If your project is open source and you can share, I'll give more ideas.
Thank you for your interest!

@rdiyewar
Copy link
Author

Thanks for the response.

My Locator and Servers are separate entities and should run in separate jvm. I can provide sufficient server hosts in SERVER_HOSTS config (say SERVER_HOSTS=host1,hostb,hostc), start locator on one of the host and servers on remaining hosts. Is it possible, if yes, then how do i distiguish between these hosts inside the code.

The "--nodeNumber" in ignite benchmark is used to count total members in the system i.e. servers + drivers. The cfg.nodes() returns what it was configured.

Also, how can i provide per server specific cofiguration. For example i want to start two server so configured it as "SERVER_HOSTS=host1,hostb", now i wan to set different server name to each server in BenchmarkServer.start() method, how this can be acheived.

Thanks,
Rahul Diyewar

@niktikhonov
Copy link

My Locator and Servers are separate entities and should run in separate jvm. I can provide sufficient server hosts in SERVER_HOSTS config (say SERVER_HOSTS=host1,hostb,hostc), start locator on one of the host and servers on remaining hosts. Is it possible, if yes, then how do i distiguish between these hosts inside the code.

You need to write additional logic in your BenchmarkServer.start(BenchmarkConfiguration cfg). You can add a server configuration parameter --locatorHost=host1,hostb or benchmark property LOCATOR_HOST=host1,hostb and handle it inside start method.

if (locatorHosts.contains(getLocalHost()) {
    // Start locator
}
else {
    // Start server
}

Also, how can i provide per server specific cofiguration. For example i want to start two server so configured it as "SERVER_HOSTS=host1,hostb", now i wan to set different server name to each server in BenchmarkServer.start() method, how this can be acheived.

Yardstick starts servers with the same configuration. You can use just environment properties as hostname, ip and etc.

@rdiyewar
Copy link
Author

Thanks. Is getLocalHost() function already availabe or do i need to implement it by my own.

Do we have some global data structure shared across all servers and drivers?

-rahul

@niktikhonov
Copy link

Thanks. Is getLocalHost() function already availabe or do i need to implement it by my own.

No, you need to implement the function. See how to get all hostname and ip. link

Do we have some global data structure shared across all servers and drivers?

Yardstick doesn't have distributed data. I can recommend to use Apache Ignite for share data. Ignite has simple API and allow create caches on the fly. You can start driver, server and locator with ignite node and simplify share your data.

@rdiyewar
Copy link
Author

rdiyewar commented Jun 1, 2015

Thanks for the responses. I feel that we should able to distinguish between server (or drivers) which helps us to provide special handeling to specific server instance if required.

Thus, i implemented MemberId support in Yardstick, refer pull request #3 .

@rdiyewar rdiyewar closed this as completed Jun 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants