https://github.com/thalhammer/mod_grpcbackend
Apache module to forward requests to a grpc backend
https://github.com/thalhammer/mod_grpcbackend
apache-module apache2 grpc protobuf
Last synced: 11 months ago
JSON representation
Apache module to forward requests to a grpc backend
- Host: GitHub
- URL: https://github.com/thalhammer/mod_grpcbackend
- Owner: Thalhammer
- License: apache-2.0
- Created: 2017-09-19T09:38:13.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-09-26T11:37:55.000Z (over 5 years ago)
- Last Synced: 2025-03-27T06:51:20.799Z (12 months ago)
- Topics: apache-module, apache2, grpc, protobuf
- Language: C++
- Size: 40 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mod_grpcbackend
This module provides a way for apache to directly interact with a grpc backend service. Using this you can add a webinterface to your grpc service without any additional libraries or complex configuration.
### Building
In order to build mod_grpcbackend on your system you need to install some required packages:
* build-essential
* protoc
* libprotobuf
* libgrpc++
* apache2-dev
If you have installed all required software checkout this repository and run
`make`
`make install`
and add the following line somewhere in your apache config:
`LoadModule grpcbackend_module /usr/lib/apache2/modules/mod_grpcbackend.so`
### Configuration
Currently mod_grpcbackend provides only 4 configuration directives, but only 2 are required for a working configuration. In addition to enabling grpcbackend using `GrpcEnabled` you need to set the handler to `grpcbackend` if you want a file to get handled by grpcbackend. See [SetHandler](https://httpd.apache.org/docs/current/mod/core.html#sethandler) and [AddHandler](https://httpd.apache.org/docs/2.4/de/mod/mod_mime.html#addhandler) for more information.
##### GrpcEnabled Directive
If you want a directory to be handled by a grpc backend, you need to set this directive to on.
##### GrpcHost Directive
This allows you to set the grpc service host and port apache will forward your requests to.
##### GrpcConnectTimeout Directive
This optional directive allows you to set a timeout in milliseconds for connecting to your backend service.
##### GrpcCallTimeout Directive
This optional directive allows you to set a timeout in milliseconds for each call to your backend service.