cloudflare / pingora

A library for building fast, reliable and evolvable network services.
Apache License 2.0
21.42k stars 1.18k forks source link

Can I use this framework to build APIs for a web project #114

Closed emirhantasdeviren closed 6 months ago

emirhantasdeviren commented 7 months ago

As the title states, can I use this framework to build APIs? What are pros and cons compared to hyper?

LessThanGreaterThan commented 7 months ago

you certainly could, but it's not really made for it.

pingora's use case is to load balance and act as a proxy. (i.e. https://blog.cloudflare.com/how-we-built-pingora-the-proxy-that-connects-cloudflare-to-the-internet )

xialeistudio commented 7 months ago

The aim of this project is to build a high-performance HTTP proxy server, and it does not include any built-in components for developing a full web application.

drcaramelsyrup commented 6 months ago

I would say that we would want Pingora to be as capable of helping you build an HTTP web server as an HTTP proxy, and there are some very, very simple examples of doing that. Like other participants have mentioned however, Pingora currently offers more features tailored to proxying and serving as an API gateway.

Feel free to file issues with that in mind, especially if you face feature gaps in your development journey. (Note that for your use case, I imagine you'd probably be using warp as opposed to using hyper directly.)