春节期间,公司组织远程培训,请Aws讲师培训Architecting on aws
,属于aws架构培训中级课程。以下内容是个人做的笔记。
Aws简介
什么是云,什么是AWS
- 可编程资源
- IAC(基础设施作为代码)
- PAY as you go
- 动态能力
- 按使用量付费
Snowflake算法(雪花算法)是由Twitter提出的一个分布式全局唯一ID生成算法,该算法生成一个64bit大小的长整数。64bit位ID结构如下:
Pandas 是一个Python语言实现的,开源,易于使用的数据架构以及数据分析工具。在Pandas中主要有两种数据类型,可以简单的理解为:
在线实验:Pandas完全指南.ipynb
学习资料:
1 | import pandas as pd |
原文:How To Manage Log Files Using Logrotate In Linux
几天前,我们发布了一份指南,介绍了如何在CentOS系统上设置集中式Rsyslog服务。今天,在本指南中,我们将了解如何在Linux上使用日志轮换来管理日志文件。该实用程序简化了日志文件的管理,尤其适用于每天生成大量日志文件的系统。顾名思义,LogRotate以固定的时间间隔将日志完全从系统中轮转出来。它还允许日志文件的自动轮转、压缩、删除和传输。每个日志文件可以每天、每周、每月或在变得太大时处理。
安卓应用的版本信息分为版本名和版本号两部分。版本名是语义性版本,一般格式是主版本号.次版本号.修订版本号
;版本号格式是数字。
应用新版本的版本号一定要旧版本要大,因为安卓系统在安装升级应用时候,会检查应用的版本号是否大于手机内已安装的该应用的版本号,若小于则直接拒绝升级此应用。
在开发需求中,有时候会需要根据应用的版本名进行筛选应用,比如筛选版本名大于7.33.1
的Netflix应用,此时若直接把每个应用的版本名索引到es里面,然后根据版本名字段range范围查询,这是有问题的。比如12.8.1
版本是高于7.31.1
版本的,因为在es里面是按照字符串逐字比较的,导致出现相反结果。
Awk是Linux系统中强大的文本处理命令工具。它名字来源于它的创始人 Alfred Aho 、Peter Weinberger 和 Brian Kernighan 姓氏的首个字母。Awk是一个工具,也是一种程序语言,类似c语言,但无需提前进行变量声明定义。一个Awk程序由一系列的模式(pattern)和动作(action)组成, 模式用于描述在输入的文本中搜索哪些数据, 当某一行文本搜索到(即匹配某个模式)之后,动作定义了如何操作该行文本。
一个awk程序格式如下:
pattern { action }
awk的操作逻辑是扫描文本每一行, 搜索可以被模式(pattern)匹配的行, 若行能够匹配模式,则接着进行执行动作(action)。
在扫描每一行过程中,awk会自动把当前行分解为一个个的字段,默认是空格进行分割,$0表示当前行内容,$1为当前行的第一段,$2为当前行的第二段,以此类推。
NGINX and NGINX Plus are also classified as web traffic control‐ lers. You can use NGINX to intellengently route traffic and control flow based on many attributes. This chapter covers NGINX’s ability to split client requests based on percentages, utilize geographical location of the clients, and control the flow of traffic in the form of rate, connection, and bandwidth limiting. As you read through this chapter, keep in mind that you can mix and match these features to enable countless possibilities.
Today’s internet user experience demands performance and uptime. To achieve this, multiple copies of the same system are run, and the load is distributed over them. As the load increases, another copy of the system can be brought online. This architecture technique is called horizontal scaling. Software-based infrastructure is increasing in popularity because of its flexibility, opening up a vast world of possibilities. Whether the use case is as small as a set of two for high availability or as large as thousands around the globe, there’s a need for a load-balancing solution that is as dynamic as the infrastructure. NGINX fills this need in a number of ways, such as HTTP, TCP, and UDP load balancing, which we cover in this chapter.
当今的互联网用户体验要求性能和时时在线。为了达到这个目的,同一个系统的多个副本需同时运行,并且将负载分布在这些副本上。随着负载的增加,系统的另一个副本可以联机。这种架构技术被称为水平拓展。基于软件的基础设施因其灵活性而越来越受欢迎,开辟了一个广阔的无限可能的世界。对于高可用性而言,用例小到两个,还是在全球范围内成千上万个,都需要一个与基础架构一样动态的负载均衡解决方案。NGINX以多种方式满足这一需求,我们在本章中将讨论超文本传输协议(HTTP)、TCP和UDP的负载平衡。