当前位置: 首页 > 编程日记 > 正文

服务器部署基础知识_我在生产部署期间学到的知识

服务器部署基础知识

by Shruti Tanwar

通过Shruti Tanwar

我在生产部署期间学到的知识 (What I learned during production deployment)

Production deployment. The final stage of every project. When all the hard work you’ve put in over the course of time goes live to be used by the target audience. It sure is an exciting time, especially when you’re part of the infrastructure setup process!

生产部署。 每个项目的最后阶段。 随着时间的推移,您付出的所有辛勤劳动都可以被目标受众使用。 这无疑是一个令人兴奋的时刻,尤其是当您参与基础架构设置过程时!

I had been part of deployment processes in the past. But this time, I got to work on a huge system in terms of volume, technology stack and infrastructure, which was an enticing escapade! I got to experience the whole process first hand and I learned quite a few things.

过去,我曾参与过部署过程。 但是这一次,我必须在容量,技术堆栈和基础架构方面开发一个庞大的系统,这是一次诱人的旅程! 我必须亲身经历整个过程,并且学到了很多东西。

Here goes the list of my learnings which I’m gonna remember and apply throughout my career as a developer.

这是我将记住的学习列表,并将在我作为开发人员的整个职业生涯中应用。

两个Struts:准备与计划⏱️ (The two P’illars: Preparation & Planning⏱️)

It goes without saying that preparation and planning should be a part of anything you do. But when it comes to production deployment, it becomes a rule. It’s a given, an imperative. You need to know the intricacies of the technologies you have worked on in your project. You’d also need to think about what kind of infrastructure would be best suited for running different kinds of systems.

毫无疑问,准备和计划应该成为您所做任何事情的一部分。 但是,当涉及到生产部署时,它成为规则。 这是必然的, 当务之急 。 您需要知道您在项目中工作过的技术的复杂性。 您还需要考虑哪种类型的基础架构最适合运行不同类型的系统。

The system we built consisted of nodejs, MongoDB, InfluxDB, redis, asp.net, and rabbitMQ as part of its technology stack. One of the primary requirements of the system was to handle a huge volume of data on a daily basis. Thus the system had to go live with a proper deployment map in mind, which clearly stated stuff like:

我们构建的系统由nodejs,MongoDB,InfluxDB,redis, asp.net和RabbitMQ组成,是其技术堆栈的一部分。 该系统的主要要求之一是每天处理大量数据。 因此,系统必须在运行时牢记正确的部署图,该图清楚地说明了以下内容:

  • What kind of system/technology was supposed to run on what kind of machine

    应该在哪种机器上运行哪种系统/技术
  • The specifications regarding the clustering of systems

    有关系统集群的规范
  • How all these stand-alone boxes were going to talk to each other in a foolproof manner.

    所有这些独立的盒子如何以一种万无一失的方式互相交谈。

本地化,全球化吗? (Do local, think global ?)

Well, this was some advice from my project architect/friend. Myself and some other young developers on the team did not have any prior experience deploying such a huge system in our careers. So our architect advised us to create a production identical system locally.

好吧,这是我的项目建筑师/朋友的一些建议。 我自己和团队中的其他一些年轻开发人员都没有在我们的职业生涯中部署如此庞大系统的任何经验。 因此,我们的架构师建议我们在本地创建与生产相同的系统。

This meant that we needed to have a hands-on experience on everything. From a clustered NodeJS environment (comprising of 8 clusters) and multiple server MongoDB setup with a production-ready Redis installation, to having production ready pm2 configs and environment variables!

这意味着我们需要对所有内容都有实际经验。 从群集的NodeJS环境(包含8个群集)和多服务器MongoDB安装程序(可用于生产的Redis安装),到具有生产就绪的pm2配置和环境变量!

And we documented everything. We worked up all the production setups on our local machines and then tested them end to end. Later we noted down all the steps it took to reach the final working infrastructure locally on our machines. This practice helped us find the typical problems encountered during infrastructure setup, and how we could overcome them.

我们记录了一切。 我们在本地计算机上整理了所有生产设置,然后进行了端到端测试。 后来,我们记下了在本地计算机上达到最终正常工作基础结构所需采取的所有步骤。 这种做法帮助我们找到了基础架构设置过程中遇到的典型问题,以及如何克服这些问题。

We noted down all pointers, lessons, and particular tweaks which we performed to make the system working. It boosted up my confidence by several notches, and I felt ready to span out the production environment for our application.

我们记下了使系统正常运行的所有指示,教训和特定调整。 它使我的信心提高了几个等级,我感到准备为我们的应用扩展生产环境。

文档,文档和文档!? (Document, Document, & Document!!?)

I know, I know. This has been said a lot. Being a developer, you’ve heard it enough. You probably don’t want another lecture on the importance of documentation. So I’m gonna keep it short by just highlighting the bullet points:

我知道我知道。 这已经说了很多。 作为开发人员,您已经听够了。 您可能不想再发表有关文档重要性的讲座。 因此,我将通过突出显示要点来使它简短:

  • Production setup should be documented to bits. It needs to be neat, foolproof, and understandable.

    生产设置应记录在位。 它必须整洁,安全且易于理解。
  • It should have all the system configurations, IP addresses, system specifications, and installation instructions. And also anything you consider important enough that you or a fellow developer should know.

    它应该具有所有系统配置,IP地址,系统规格和安装说明。 还有您认为足够重要的任何东西,您或其他开发人员都应该知道。
  • It needs to be updated as and when any change is made to the production environment of the system.

    当对系统的生产环境进行任何更改时,都需要对其进行更新。

Being human, it’s quite common to think along the lines of, “Oh! I’m gonna remember that!” Trust me, you won’t. No one in the history of software development ever has (Okay, that might be taking it a little too far, but you get the idea.? )!

作为人,通常会想到“哦! 我会记得的!” 相信我, 你不会 。 在软件开发的历史上,没有人能做到(好吧,这可能会使它走得太远了,但是您知道了。)!

Document all the data & meta-data around your production setup. You’re gonna thank yourself later. Future developers who will be onboard your project will thank you subsequently!

记录生产设置中的所有数据和元数据。 您稍后会感谢您。 将来将参与您的项目的将来的开发人员将感谢您!

监视和记录? (Monitoring & Logging ?)

During the development tenure of a project, it’s comparatively easier to deal with bugs and errors. Something isn’t working? Lemme just quickly login to dev box and check. Well, that does not happen in production. You can’t login to a live system and start poking around just because you do not understand where the problem is coming from.

在项目的开发期间,处理错误和错误相对容易一些。 某事不起作用? Lemme只需快速登录到开发框并进行检查。 好吧,这在生产中不会发生。 您不能登录到实时系统并开始闲逛只是因为您不了解问题的根源。

Setting up a proper monitoring and logging system is essential to keeping a health check on the live system. Intelligent monitoring systems are available in the market today which can give you error frequency reports, scheduled health check emails, and more.

建立适当的监视和日志记录系统对于保持实时系统的运行状况检查至关重要。 当今市场上有智能监控系统,可以为您提供错误频率报告,计划的健康检查电子邮件等。

We decided on Sumologic and DataDog as our companions in spawning out the logging and monitoring system for our application. It was almost enthralling when I could figure out the problem in the system without doing a “ssh”.

我们选择SumologicDataDog作为我们的伴侣,为我们的应用程序生成日志记录和监视系统。 当我无需执行“ ssh”就能找出系统中的问题时,这简直令人着迷。

A decorous setup of a monitoring system goes a long way in laying a strong foundation for your live product. Do not miss out on that!

精心布置的监控系统可以为您的实时产品打下坚实的基础 。 千万不要错过!

Phew! Well, that’s a wrap! What are your findings? Feel free to share your learnings, advice, or pointers in the comments below!

! 好吧,这就是包装! 你有什么发现? 欢迎在下面的评论中分享您的学习,建议或建议!

翻译自: https://www.freecodecamp.org/news/what-i-learned-during-production-deployment-fe037a6ee4db/

服务器部署基础知识

相关文章:

STM32 KEIL中 负数绝对值处理

使用数码管显示负温度时需要把负数转换为绝对值 #include<math.h> 使用abs 或者自己写函数 #define ABS(x) ((x)>0?(x):-(x)))转载于:https://www.cnblogs.com/yekongdexingxing/p/6657371.html

js数组按照下标对象的属性排序

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 根据数组中某个参数的值的大小进行升序 <script type"text/javascript">function compare(val) {return function (a, b) {var value1 a[val];var value2 b[val];return value1…

window 下相关命令

1. 启动window服务(各种应用启动设置的地方)命令方式&#xff1a; 1). window 按钮(输入CMD的地方)处输入&#xff1a;services.msc &#xff0c;然后执行。 // 输入命令正确&#xff0c;上面的待选框中会出现要执行的命令。msc 可以理解为Microsoft client 2). 计算机 -- …

javascript语法糖_语法糖和JavaScript糖尿病

javascript语法糖by Ryan Yurkanin瑞安尤卡宁(Ryan Yurkanin) 语法糖和JavaScript糖尿病 (Syntactic Sugar and JavaScript Diabetes) Syntactic sugar is shorthand for communicating a larger thought in a programming language.语法糖是用编程语言传达更大思想的简写。 …

《DSP using MATLAB》示例Example7.23

代码&#xff1a; wp 0.2*pi; ws 0.3*pi; Rp 0.25; As 50; [delta1, delta2] db2delta(Rp, As);[N, f, m, weights] firpmord([wp, ws]/pi, [1, 0], [delta1, delta2]);N f m weightsh firpm(N, f, m, weights); [db, mag, pha, grd, w] freqz_m(h, [1]);delta_w 2*pi…

css画图笔记

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 正文&#xff1a; 在网页中&#xff0c;经常会用到各种Icon&#xff0c;如果老是麻烦设计狮画出来不免有些不好意思&#xff0c;所以有时候我们也可以用CSS写出各种简单的形状&#xff0c;一来可以减轻…

Web前端开发最佳实践(8):还没有给CSS样式排序?其实你可以更专业一些

前言 CSS样式排序是指按照一定的规则排列CSS样式属性的定义&#xff0c;排序并不会影响CSS样式的功能和性能&#xff0c;只是让代码看起来更加整洁。CSS代码的逻辑性并不强&#xff0c;一般的开发者写CSS样式也很随意&#xff0c;所以如果不借助工具&#xff0c;不太容易按照既…

超越Android:Kotlin在后端的工作方式

by Adam Arold亚当阿罗德(Adam Arold) 超越Android&#xff1a;Kotlin在后端的工作方式 (Going Beyond Android: how Kotlin works on the Backend) This article is part of a series.本文是系列文章的一部分。 While most developers use Kotlin on Android, it is also a …

词汇的理解 —— 汉译英(术语)

词汇的理解 —— 英译汉 1. 名词 机制&#xff1a;mechanism&#xff0c;系统&#xff1a;system&#xff1b;2. 动词 融资&#xff1a;financing&#xff1b;制动&#xff1a;braking&#xff0c;就是“刹车”&#xff1b;3. 音乐与乐器 horn&#xff1a;喇叭&#xff0c;号角…

Swift从零开始学习_08(代理协议传值)

Swift中的代理协议的写法. 这是第一个页面有一个button和一个label, button点击跳到下一个页面. 第二个页面有一个输入框和一个按钮, 点击按钮把输入框里的内容设置为第一个页面label的内容.效果如下 接下来是代码部分.跟OC的写法还是一样的.这里不再写第一个页面的那些UI的…

[微信小程序]商城之购买商品数量实现

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 正文&#xff1a; 这里有三种变更数量的方式&#xff0c; 加号&#xff0c;减号&#xff0c;input输入 &#xff0c; 这里做了限制&#xff0c;数量不能小于等于0并且不能超过现有库存&#xff0c;下面是…

测试nginx网站代码_在40行以下代码中使用NGINX进行A / B测试

测试nginx网站代码by Nitish Phanse由Nitish Phanse 在40行以下代码中使用NGINX进行A / B测试 (A/B testing with NGINX in under 40 lines of code) A/B Testing, has enabled designers and product managers to get a deep insight into user behavioral patterns.A / B测试…

HttpServletResponse,HttpServletRequest详解

HttpServletResponse,HttpServletRequest详解 1、相关的接口 HttpServletRequest HttpServletRequest接口最常用的方法就是获得请求中的参数&#xff0c;这些参数一般是客户端表单中的数据。同时&#xff0c;HttpServletRequest接口可以获取由客户端传送的名称&#xff0c;也可…

[微信小程序]this.setData , that.setData , this.data.val三者之间的区别和作用

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 正文&#xff1a; 1.this.setData({ }) <view bindtouchmove"tap_drag" bindtouchend"tap_end" bindtouchstart"tap_start" class"page-top" style"{…

jQuery(一)引入

一、jQuery简介 jQuery是一个兼容多浏览器的javascript库&#xff0c;核心理念是write less,do more(写得更少,做得更多) 二、安装 2.1、下载 下载地址&#xff1a;http://jquery.com/download/ 2.2、引入 在页面头部加入 <head> <meta http-equiv"Content-Type&…

javascript 堆栈_JavaScript调用堆栈-它是什么以及为什么它是必需的

javascript 堆栈The JavaScript engine (which is found in a hosting environment like the browser), is a single-threaded interpreter comprising of a heap and a single call stack. The browser provides web APIs like the DOM, AJAX, and Timers.JavaScript引擎(可在…

idea崩溃导致的svn插件丢失问题, maven dependencies视图丢失问题

Idea丢失Svn解决办法今天打开Idea&#xff0c;习惯用ctrlt来更新svn&#xff0c;杯具出现了&#xff0c;快捷键失效了&#xff0c;我觉得可能是其他的什么软件占用了这个快捷键&#xff0c;于是重启了一下&#xff0c;发现还是不行&#xff0c;svn信息怎么没了&#xff0c;chan…

python3代码

import urllib.request url"http://mm.taobao.com/json/request_top_list.htm?type0&page1" upurllib.request.urlopen(url)#打开目标页面&#xff0c;存入变量up contup.read()#从up中读入该HTML文件 key1<a href"http#设置关键字1key2"target&qu…

【微信小程序】侧滑栏,手动侧滑出个人中心(完整代码附效果图)

微信小程序开发交流qq群 581478349 承接微信小程序开发。扫码加微信。 正文&#xff1a; 博文分三部分&#xff0c;1.效果图及功能效果说明 2.实现思路 3.源代码 欢迎加入微信小程序开发交流群&#xff08;173683895&#xff09; 一.老惯例先上效果图&#xff0c;本篇博…

1:1 人脸比对 开源_Hacktoberfest:我的开源门户

1:1 人脸比对 开源by Maribel Duran通过Maribel Duran Hacktoberfest&#xff1a;我的开源门户 (Hacktoberfest: My Gateway to Open Source) “Individually, we are one drop. Together, we are an ocean.”“就个人而言&#xff0c;我们只是一滴滴。 在一起&#xff0c;我们…

地图收敛心得170405

寻路算法大总结! 交换机生成树采用的是完全不同的D-V(distance vector)距离矢量算法,并不是很可靠. 并不是任意两点之间的最短路径,因为任意两点之间取最短路径可能有环路:总权更大 交换机STP不一定是最小生成树!!!举例论证 因为它只是所有交换机到根桥最短 贪心算法的味道 kru…

微信小程序游戏开发文档以及开发工具地址

微信小程序开发交流qq群 581478349 承接微信小程序开发。扫码加微信。 正文&#xff1a; 微信官方于 2017 - 12 - 28 日 开发微信小程序 开发小游戏 &#xff0c; 微信小程序小游戏开发官方文档的地址 https://mp.weixin.qq.com/debug/wxagame/dev/index.html?t20171228…

c#编译执行过程

创建一个简单的控制台程序&#xff0c;源码如下&#xff1a; using System; using System.Collections.Generic; using System.Linq; using System.Text;namespace csharpBuildProcess {class Program{static void Main(string[] args){for (int i 0; i < 100; i){if(i%20)…

渐进式web应用程序_渐进式Web应用程序简介

渐进式web应用程序Interested in learning JavaScript? Get my ebook at jshandbook.com有兴趣学习JavaScript吗&#xff1f; 在jshandbook.com上获取我的电子书 Progressive Web Apps (PWA) are the latest trend in mobile application development using web technologies.…

第二百二十节,jQuery EasyUI,Slider(滑动条)组件

jQuery EasyUI&#xff0c;Slider(滑动条)组件 学习要点&#xff1a; 1.加载方式 2.属性列表 3.事件列表 4.方法列表 本节课重点了解 EasyUI 中 Slider(滑动条)组件的使用方法&#xff0c;这个组件依赖于 Draggable(拖动)组件。 一&#xff0e;加载方式 class 加载方式 <…

适用于SharePoint 2013 的 CAML Desinger

适用于SharePoint 2013 的 CAML Desinger 分类&#xff1a; SharePoint2013-01-15 21:52 1877人阅读 评论(0) 收藏 举报CAMLDesingerSharePoint 2013代码生成适用于如果说Sql是信息管理系统的一等公民&#xff0c;那么SharePoint 系统中的一等公民就非CAML莫属了。 但是这个一等…

微信小程序 跑马灯效果完整代码附效果图

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 正文&#xff1a; 一&#xff1a;功能介绍及讲解 实现的跑马灯&#xff08;跑马灯里面显示文章的title&#xff09;的效果&#xff0c;并在右侧有个查看文章的按钮&#xff0c;按钮绑定当前的跑马灯信…

热闹的聚会与尴尬的聚会_如何增加(和保存)您最喜欢的技术聚会

热闹的聚会与尴尬的聚会by Jen Weber詹韦伯(Jen Weber) 如何增加(和保存)您最喜欢的技术聚会 (How to Grow (and Save) Your Favorite Tech Meetup) Hey meetup facilitators, friends, and future leaders! Do you want more people to show up to your tech event? Or at l…

蓝桥杯-搭积木-java

/* (程序头部注释开始) * 程序的版权和版本声明部分 * Copyright (c) 2016, 广州科技贸易职业学院信息工程系学生 * All rights reserved. * 文件名称&#xff1a; 蓝桥杯赛题 * 作 者&#xff1a; 彭俊豪 * 完成日期&#xf…

微信小程序多张图片和表单一起上传,验证表单及进度条的实现完整代码

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 正文&#xff1a; 效果图&#xff1a; 完整代码: <!--pages/register/register.wxml--> <view classtop> <view>注 册 须 知 : </view> </view> <view> <view …