The Art of Planning

“Don’t think about the start of the race, think about the ending” – Usain Bolt

One common question, I’m receiving from most of my friends is

How you are managing your time to do these many things?

Actually, they meant how I’m being active in learning new tools, reading books, making progress in blogging, posting random pieces of stuff at social media and all.

I took this question seriously and planned to answer them all via this blog post.

Planning is the ultimate key to unlock these activities.

 

Why planning?

A couple of years back I too had the same set of questions on how to create an action plan and how to efficiently work on it.

I have started reading some books, watching some YouTube videos, and listening to other people stories on how they are managing time on personal life as well towards their passion.

I have written all good ideas I have collected from the various medium in a notepad.

Later, I have clearly picked up the items which suit me.

On most time management & goal settings stories, I have found one common habit or ground rule.

It’s PLANNING!

 

How I have prepared my action plan?

Then, I have come up with an idea to create an action plan. I have started listing all things I wished or dreamed to complete in next few weeks or months or years.

Once I have listed all the items I wish to do. It looks like a large list, kind of watching a horror movie at midnight.

Instead of making progress in all the items at the same time, I have come up with idea of

  • prioritizing
  • categorizing

I have started to prioritize the list based on Career growth and Personal growth from most to least important. (Kind of bubble sort, decided which bubbles I need to burst first)

After prioritizing, Its time for categorizing.

In my case, I have decided to Categorize my action plan based on what time frame I have to achieve it.

So, the categories will look like this

  • Long-term
  • Short term
  • Daily
  • Today

The long-term goal is something I planned to achieve in few years. Short term goal is the items I wish to cover in minimum one year. Daily goals are like checklist I should follow on daily basis. Today board is to plan for the day ahead.

Ultimately, my planning board looks like following

planning

I shall create a separate post on how I plan for the day ahead.

I used to keep this list on my desktop screen always using sticky notes options on my windows laptop.

Basically, I’m a sticky note lover. And below is my monitor screen filled with sticky notes 🙂

sticky_notes_overused

 

Next big step

We have planned everything, whats the next big step?

Executing

Yes! A very organized plan will help you to make consistent progress to reach your goal.

 

Hope you have like this post, please follow this blog to receive more updates.

And also Please comment your thoughts or share your ideas on planning in the comment section.

 

Happy planning!

 

 

Elasticsearch Cluster settings for Production Deployment

The following settings are needed to set in the configuration in the cluster to achieve high availability and stability.

Data and logs path

By default, the plugins, logs, and data are placed in the installation path. This can lead to unfortunate accidents, whereby the installation directory is accidentally overwritten by a new installation of Elasticsearch. The best thing to do is relocate the data, log, plugins directory outside the installation location as follows

# Path to store data
path.data: /path/to/data1,/path/to/data2

# Path to store log files
path.logs: /path/to/logs

# Path to where plugins are installed
path.plugins: /path/to/plugins

Minimum master nodes

Minimum master node settings prevent split brain, which appears due to the presence of two master in a single cluster. If we have two masters, data integrity becomes perilous, since we have two nodes that think they are in charge. If the split brain happens, there is a possibility of losing data.
This setting should always be configured to a quorum (majority) of your master-eligible nodes. A quorum is (number of master-eligible nodes / 2) +1. In our case currently, we are having 3 nodes so we can set a minimum master node as 2. This setting can be configured as follows in config file

discovery.zen.minimum_master_nodes: 2

The cluster settings can be configured using dynamic API calls also as follows

PUT /_cluster/settings
{
 "persistent" : {
 "discovery.zen.minimum_master_nodes" : 2
 }
}

This setting will become a persistent setting that takes precedence over whatever is in the static configuration.

Default Ping timeout

The node detection process is processed by the discover.zen.fd.ping_timeout property. The ping between nodes will be timed out within 3 seconds in Elasticsearch v1.5.2. This setting can be adjusted if we are facing slowness in the network.

discover.zen.fd.ping_timeout: 30s

Delete all indices settings

The delete index operation can be applied to more than one index or all indices in the cluster using wildcards. In order to avoid this case, we can
disable deleting indices using wild cards by setting action.destructive_requires_name property into true.

PUT /_cluster/settings
{
 "persistent": {
 "action.destructive_requires_name": true
 }
}

Using Unicast over Multicast

Multicast is excellent in the development phase, which will automatically join nodes in the network and forms cluster. But Elasticsearch recommends using Unicast over Multicast in Production. We should provide a list of nodes that need to be present in the cluster. The Unicast can be achieved by setting as follows in the Configuration file

discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["HOST1", "HOST2", "HOST3"]

Recovery settings

To avoid the shard shuffle on the recovery when the cluster restarts, we need to customized the recovery settings. When cluster restarts, ElasticSearch does not know how many nodes will finally be in the cluster, it tries to balance all known primary shards and replicas to the known machines. When another node suddenly joins the cluster, this whole strategy will change. To avoid the traffic and the overhead of this, ElasticSearch can be configured with a minimum number of nodes it should expect before starting the recovery phase.
The following settings will prevent Elasticsearch from starting until the at least specified number of nodes are present.

gateway.recover_after_nodes: 2

The following settings configures Elasticsearch, how many nodes should be in the cluster, and how long the cluster want to wait for all those
nodes

gateway.expected_nodes: 2
gateway.recover_after_time: 5m

Memory Settings

The ES_HEAP_SIZE environment variable allows setting the heap memory that will be allocated to elasticsearch java process. I already made a detailed post about settings Heap Size in Windows.
The environment variable set with values as follows

ES_HEAP_SIZE
4g

mlockall

To lock the process address space into RAM, preventing any Elasticsearch memory from being swapped out by configuring as follows

bootstrap.mlockall: true

We can check whether settings are applied to the nodes or not by using any one of the following commands

curl http://localhost:9200/_nodes/process?pretty
GET /_nodes/process?pretty

Note that the environment configuration options available during the installation are copied and will be used during the service lifecycle.
This means any changes made to them after the installation will not be picked up unless the service is reinstalled.