For a parachain
is it ok to have RPC
and collator
in one node? If not why? I'd love to hear some deeper explanation.
2 Answers
It depends of who can access the RPC part but mostly it is not a good idea if other people than you can access it.
The role of the collator is to produce blocks, at a very specific moment (when receiving a new relay block) for a very limited amount of time (currently limited to 500ms).
If during the time the collator is producing the block, most of the computer resources (not only CPU, but also memory, I/O, locks...) are taken by some RPC requests, it will reduce the probably to produce a full block and also reduce the probably to have your block sent in time to the relay.
Not good for production use. Threadpool is already occupied with collator tasks
But its okay for testing, won't be any difference to try rpc calls on polkadot.js.org
If you have less than 2k ws connection and 5k/s http requests it will be fine