什么是staging server

本文介绍了软件应用开发中从开发到生产的各个环境,重点讲解了模拟环境(staging)的作用及其组成,包括模拟数据库服务器和模拟服务器。阐述了如何在模拟环境中进行测试以确保更新版本在正式上线前的稳定性。

软件应用开发的经典模型有这样几个环境:开发环境(development)、集成环境(integration)、测试环境(testing)、QA验证,模拟环境(staging)、生产环境(production)。


通常一个web项目都需要一个staging环境,一来给客户做演示,二来可以作为production server的一个“预演”,正式发布新功能前能及早发现问题(特别是gem的依赖问题,环境问题等)。

From wiki: Staging site, in website design, is a website used to assemble, test and review its newer versions before it is moved into production. This phase follows the development phase. The staging phase of the software life-cycle is often tested on hardware that mirrors hardware used in the production environment. The staging site is often different from the development site, and provides a QA zone that is separate from the development or production environments.
 
Normally before deploying an updated version of software to the production environment, the update has been tested in the staging environment. The staging server will resemble the production environment where the clients can do the user acceptance testing activities. Tests on Staging server/site should be passed before deployment of system on live server, i.e. production environment.

staging server可以理解为production环境的镜像, QA在staging server上对新版本做最后一轮verification, 通过后才能deploy到产品线上. 有点网讯SERCM流程里面的SDA验证用的环境, 尽最大可能来模拟产品线上的环境(硬件,网络拓扑结构,数据库数据)

 


The staging environment consists of two components:

The staging database server.


The staging server.

 


Staging Database Server

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

 

The staging database server contains the business data, such as marketing campaigns and product catalogs, and database resources that you want to stage to the database servers in the production environment.

Business users can update business data in the staging environment so that you can test and approve the changes before you incorporate the changes into the run-time environment. The staging environment prevents disruption of the run-time site and services by isolating the test and production systems.

 

Staging Server

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

 

The staging server is a mirror of the production business management server.

You create staging projects and routes on the staging server to deploy site updates from the test environment to the production environment. You can also use the staging server to deploy updates to geographically distributed environments across a wide area network (WAN).

For example, business users and internal developers might update various aspects of the retail Web site at your headquarters in New York, where your test and production environments reside at the local data center. However, you might also maintain production environments in Seattle, Los Angeles, and Chicago. Therefore, you can use Commerce Server Staging (CSS) on the staging server to deploy local site updates to the production servers in other remote cities.
 

### **STAGING_APS 的含义** **STAGING_APS** 通常是 **Staging Application Server**(预发布/分级应用服务器)的缩写,常见于软件开发和运维领域,指用于 **测试和预发布环境** 的应用服务器。以下是详细解析: --- ### **1. 核心概念** - **Staging(预发布环境)** 介于开发(Development)和生产(Production)之间的环境,用于模拟真实生产环境,进行最终测试(如性能、集成测试)。 - 特点:数据、配置与生产环境高度一致,但不对真实用户开放。 - 目的:确保代码在上线前无重大缺陷。 - **APS(Application Server)** 指运行应用程序的服务器,如 Tomcat(Java)、Nginx + uWSGI(Python)、IIS(.NET)等。 --- ### **2. STAGING_APS 的作用** - **功能测试**:验证新功能在准生产环境的行为。 - **性能压测**:模拟高并发请求,检查服务器负载。 - **安全审计**:检测潜在漏洞(如数据库注入)。 - **发布预演**:演练部署流程(如蓝绿部署、回滚)。 --- ### **3. 与其他环境的对比** | **环境类型** | 用途 | 数据来源 | 访问权限 | |----------------|-------------------------------|------------------------|------------------| | **Development**| 开发者本地调试 | 模拟数据/Mock | 仅开发团队 | | **Staging** | 预发布测试(STAGING_APS) | 生产数据脱敏/备份 | 测试团队/QA | | **Production** | 真实用户服务 | 实时生产数据 | 所有用户 | --- ### **4. 典型工作流程** 1. 代码通过开发环境测试 → 部署到 **STAGING_APS**。 2. 在 Staging 中运行自动化测试 + 人工验收。 3. 确认无误后,发布到生产环境(Production)。 --- ### **5. 技术实现示例** - **Kubernetes 标签**: ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: my-app labels: env: staging # 标识为Staging环境 ``` - **CI/CD 管道**(如 GitLab CI): ```yaml deploy_staging: stage: deploy script: - kubectl apply -f staging/ # 部署到STAGING_APS only: - main # 仅main分支触发 ``` ---
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值