A microservice should be a self-contained, understandable and on-its-own usable component.
For example, a service which resolves zip codes to cities is a microservice by this definition.
Another example: a service which generates PDFs from URLs by rendering them in a browser like chrome-headless.
Another example: a service which gathers statistics from a git repository.
A microservice, from my POV, is not:
- something you use in tight loops
- something which provides only an abstract value, like for example a aggregation of min/max/avg/median values of a list
- something which either doesn't deliver a value of non-trivial complexity nor is useful to the general public on its own
In other words, if the choice of protocol (in this case REST) matters in terms of speed, you shouldn't talk about a microservice but more of a component. This may be a component communicating using TCP, or whatever protocol you choose. But I'd call something like that not a microservice, but a component. In most languages you'd use a "library", a "jar" or something of this scale.
Terminology matters (at least to me in this regard :) )