What's the characteristics and criterion of choosing master and search (kibana) nodes

Hey I am trying to design a cluster in a real use case, it's well-known that when we have more then 5 data nodes, the number of master nodes should be 3 (at least if I am wrong), but I can't decide the characteritics of each master nodes (RAM size, number of CPUs, disk space).

Same problem goes for Kibana (search) nodes, I have to take into consideration: the number of users, overall requests sent to elasticsearch nodes, number of dashboards, number of visualization, ML jobs or not, etc. How can I decide the RAM size between 8 GB or 16GB, for example if I have 10 users.

I looked on this article about Benchmarking and sizing your Elasticsearch cluster for logs and metrics but don't tell answers about my questions!

Any feedback is highly appreciated as I am quite beginner in designing elastic clusters :grinning_face_with_smiling_eyes: