Original post

I have several services that communicate via JSON REST.
I want to start migrating to gRPC, but I need to continue supporting existing endpoints that accept JSON. My online searches have not been fruitful to provide an example where an app listens on 1 port and each handler accepts different payloads (one JSON and another gRPC messages).

I’m starting to suspect this is not possible, but raising the question here in case I’m mistaken. So, is it possible to have 1 service listen on 1 port and different handlers manage either JSON or gRPC? I seethe value of protobuf (strongly typed messages) and the efficiency of gRPC so I want to convert…. slowly.