> Probably just the interface - function calls become RPC.
This sounds simple, but once "function calls become RPC" then your client app also needs to handle:
* DNS server unreachable
* DNS server reachable but RPC hostname won't resolve
* RPC host resolves but not reachable
* RPC host reachable but refuses connection
* RPC host accepts connection but rejects client authentication
* RPC host presents untrusted TLS cert
* RPC accepts authentication but this client has exceeded the rate limit
* RPC accepts authentication but says 301 moved permanently
* RPC host accepts request but it will be x seconds before result is ready
* RPC host times out
Even for a well-factored app, handling these execution paths robustly probably means rearchitecting to allow you to asynchronously queue and rate limit requests, cache results, handle failure with logarithmic back-off retry, and operate with configurable client credentials, trust store, and resource URLs (so you can honor 301 Moved Permanently) and log all the failures.
You'll also need additional RPC functions and parameters to provide data that had previously been in context for local function calls.
Then the monolith's UI may now need to communicate network delays and failures to the user that were impossible before network segmentation could split the app itself.
Refactoring into microservices will require significant effort even for the most well built monolith.