title: Why do we need to register reflection service on gRPC server
body: <p>I was going through this code of gRPC server. Can anyone tell me the need for reflection used <a href="https://github.com/grpc/grpc-go/blob/master/examples/helloworld/greeter_server/main.go#L65" rel="noreferrer">here</a></p>
  
  <p><strong>Code :</strong></p>
  
  <pre><code>func main() {
      lis, err := net.Listen("tcp", port)
      if err != nil {
          log.Fatalf("failed to listen: %v", err)
      }
      s := grpc.NewServer()
      pb.RegisterGreeterServer(s, &amp;server{})
      // Register reflection service on gRPC server.
      reflection.Register(s)
      if err := s.Serve(lis); err != nil {
          log.Fatalf("failed to serve: %v", err)
      }
  }
  </code></pre>