In my last post, I gave an example how easy it is to setup and run rethinkdb servers on local computers. In this blog , I will give you understanding howAdd New you can configure rethinkdb server command line, so you can setup some of the options manually according to your needs and resources that you have available.
- how to manually specify directory to store data and metadata.for that they have -d filePath option at the time of starting server.
Ex : rethinkdb -d /home/vj(username)/rethinkdb_data/this will start server and store data and useful metadata to /home/vj(username)/rethinkdb_data/ directory.Pin Points : if the directory is not present then rethinkdb will create it for you , so you don’t have to worry about that.
- Controlling concurrency.rethinkdb also provides a way of handling number of i/o connections.–io-threads n: how many simultaneous I/O operations can happen at the same time where n is integer , number of operation simultaneously.
- controlling cache sizewell, here if you are providing very low cache size then rethinkdb will give you warning about cache size about impact on performance due to low cache size. so my advise is if you do not have certain requirements about cache then leave it auto. rethinkdb server demon is smart enough to figure it out on its own.cool !!.–cache-size mb: total cache size (in megabytes) for the process. Can be ‘auto’.
- well , rethinkdb also has cool feature about naming servers , if you want to provide name or tag to your server instance for identification you can do it with rethinkdb. this feature can be helpful when you have many server instances in your cluster and you want to identify them.Ex : rethinkdb -n[–server-name] yourNameEx : rethinkdb -t[–server-tag] youtTag.Important difference here between tag and name is you can provide name only once when you are starting your server instance first time. but you can provide tag each time you restart your server. small but detailed feature for identification of instances.
- we know that rethinkdb has inbuilt web interface client built, we can query and manage servers and clusters through it(you can read it in my next blog.).it runs on 8080 port by default. but what if you want to change it ? here is how you can do.–http-port port: port for web administration consolewell, if you don’t want http panel , you can disable also using below command.–no-http-admin: disable web administration console
- One of the cool feature according to me is you can assign number of cpus to rethinkdb. waw, asesome. suppose that you have very limited resources and you have to manage application + database and all sort of stuff. so you can give rethinkdb command line argument that Mr.rethinkdb you have to use only 1 out of 2 cpus no matter how much load you are into. and simply rethinkdb will obey you without asking question( like a winter soldier ).
- well , there are lots of options available for rethinkdb, i have given you some of the most used options. but if you want to know about most of them you can go to this link and research it yourself and find out what commands you can use into your application to make it run more efficiently.Link : http://rethinkdb.com/docs/cli-options/also you can run command “rethinkdb help” to get same information in your terminal.
Well, what kind of tools and softwares people use mostly ? because software makes their life easier right ? rethinkdb is here to solve same problem by providing easy to use tools for managing cluster based distributed real time database solution. in my future blogs i will post more about how you can use rethinkdb in your application and query data.
if you like my articles then follow me on twitter or add me on facebook and lets have some chitchat :
Twitter Link : https://twitter.com/VJBambhaniya
Facebook Link : https://www.facebook.com/Mr.BVM
I would love to hear from you.
thank you guys. have fun :: Peace.