Total Pageviews

Tuesday, 5 November 2024

探秘 Pingora:Cloudflare 的高效静态网站生成器

 

高效的内容处理

Pingora 使用 Markdown 解析器,支持 YAML 头信息,可以方便地处理结构化数据,如博客文章、项目描述等。此外,它还支持自定义模板引擎,允许开发者根据需求定制页面布局和样式。

 动态功能集成

虽然生成的是静态网站,但 Pingora 支持与动态服务(如 API)集成,实现了静态站点与动态数据的完美结合。这种特性在构建如在线商店、实时博客等应用时非常有用。

安全性

作为一个来自 Cloudflare 的项目,安全性是其核心关注点之一。Pingora 提供了内置的安全措施,包括对模板注入的防护,确保你的站点免受常见攻击。

应用场景

  • 个人博客 - 快速搭建一个响应式、高性能的博客平台。
  • 企业官网 - 创建专业且易于维护的企业网站,展示产品和服务。
  • 文档管理系统 - 为开源项目或内部团队构建简洁清晰的文档库。
  • 电子商务 - 结合动态后端实现轻量级电商站点,提高加载速度和用户体验。

特点总结

  1. 高性能 - 利用 Go 语言的优势,构建出快速加载的静态页面。
  2. 易用性 - 简单的配置文件和Markdown支持,让内容创作变得简单。
  3. 高度可定制 - 自定义模板和插件系统适应各种需求。
  4. 安全可靠 - 内置的安全特性保护你的站点不受恶意攻击。
  5. 无缝集成 - 可与API和其他动态服务协同工作,增加功能性。

如果你正在寻找一款现代、强大而又易于使用的静态网站生成工具,那么 Pingora 绝对值得尝试!立即访问 ,开始你的静态网站构建之旅吧!

---------------------

What is Pingora

Pingora is a Rust framework to build fast, reliable and programmable networked systems.

Pingora is battle tested as it has been serving more than 40 million Internet requests per second for more than a few years.

Feature highlights

  • Async Rust: fast and reliable
  • HTTP 1/2 end to end proxy
  • TLS over OpenSSL, BoringSSL or rustls(experimental).
  • gRPC and websocket proxying
  • Graceful reload
  • Customizable load balancing and failover strategies
  • Support for a variety of observability tools

Reasons to use Pingora

  • Security is your top priority: Pingora is a more memory safe alternative for services that are written in C/C++
  • Your service is performance-sensitive: Pingora is fast and efficient
  • Your service requires extensive customization: The APIs Pingora proxy framework provides are highly programmable

Getting started

See our quick starting guide to see how easy it is to build a load balancer.

Our user guide covers more topics such as how to configure and run Pingora servers, as well as how to build custom HTTP servers and proxy logic on top of Pingora's framework.

API docs are also available for all the crates.

Notable crates in this workspace

  • Pingora: the "public facing" crate to build networked systems and proxies
  • Pingora-core: this crate defines the protocols, functionalities and basic traits
  • Pingora-proxy: the logic and APIs to build HTTP proxies
  • Pingora-error: the common error type used across Pingora crates
  • Pingora-http: the HTTP header definitions and APIs
  • Pingora-openssl & pingora-boringssl: SSL related extensions and APIs
  • Pingora-ketama: the Ketama consistent algorithm
  • Pingora-limits: efficient counting algorithms
  • Pingora-load-balancing: load balancing algorithm extensions for pingora-proxy
  • Pingora-memory-cache: Async in-memory caching with cache lock to prevent cache stampede
  • Pingora-timeout: A more efficient async timer system
  • TinyUfo: The caching algorithm behind pingora-memory-cache

System requirements

Systems

Linux is our tier 1 environment and main focus.

We will try our best for most code to compile for Unix environments. This is for developers and users to have an easier time developing with Pingora in Unix-like environments like macOS (though some features might be missing)

Windows support is preliminary by community's best effort only.

Both x86_64 and aarch64 architectures will be supported.

Rust version

Pingora keeps a rolling MSRV (minimum supported Rust version) policy of 6 months. This means we will accept PRs that upgrade the MSRV as long as the new Rust version used is at least 6 months old.

Our current MSRV is 1.72.

Build Requirements

Some of the crates in this repository have dependencies on additional tools and libraries that must be satisfied in order to build them:

  • Make sure that Clang is installed on your system (for boringssl)
  • Make sure that Perl 5 is installed on your system (for openssl)

from https://github.com/cloudflare/pingora

 

No comments:

Post a Comment