Back To The Basics

Trivialities on mathematics and computer science.


  • Home

  • About

  • Archives

  • Search

Pod的冗余保护

Posted on 2019-06-10 | In k8s cluster | Visitors:

k8s使用ReplicationController和ReplicaSet对pod进行冗余保护控制,ReplicationController逐渐被淘汰。另外还有DaemonSets,Job,CronJob几种特殊需求的冗余控制,使用配置文件定制好了冗余Pod数量之后,k8s自动进行Pod的冗余监控以及停启操作。

Read more »

K8S中的标签使用

Posted on 2019-05-30 | In k8s cluster | Visitors:

标签可以用于管理Pod,对Pod进行分类处理,比如多个Pod运行多个MSC网元,另外多个Pod运行CUDB网元,那么可以给这些Pod指定Type标签,对于MSC网元的版本也可能不同,所以还可以指定Version标签。标签对于K8S中的可操作元素的归类和管理具有重要意义。

Read more »

搭建Kubernetes集群

Posted on 2019-05-10 | In k8s cluster | Visitors:

尝试用虚拟机手工搭建k8s集群,本文是搭建流程简单记录,使用了三台CentOS虚拟机节点作为物理Node,由于众所周知的原因,公网引发问题不计其数,所以需要一些额外的垃圾步骤,并且过程中遇到了很多莫名巧妙的问题,多次重新安装了虚拟机及中间的一些Trouble Shooting,为了确保流程简洁此处暂时省略少部分细节。

Read more »

一个单独的容器应用

Posted on 2019-05-01 | In k8s cluster | Visitors:

开始学习Kubernetes,并对学习过程做一些简单记录。本篇记录以Docker容器形式启动一个Web应用的方法,首先将Web需要的Html文件以本地文件的形式挂载到Nginx容器上,然后再尝试写一个Dockerfile将所需要的网页文件直接写入到Docker镜像中,创建一个镜像并以新镜像直接运行此应用。虚拟机和宿主机用Bridge方式连接。从宿主机浏览器访问虚拟机中所运行Docker容器内的Web服务。

Read more »

容器的本质

Posted on 2019-04-18 | In k8s cluster | Visitors:

随着5G的到来,互联网和通信技术的演进,被谷歌力推的Kubernetes现在已经成为业界操作容器的标准方案。Kubernetes控制对象是容器,那么究竟什么是容器?容器的本质是什么?为什么江湖传闻它相比于虚拟机更轻便?为什么说容器的底层存在安全隐患,隐患从何而来?为什么对于Linux系统自身根本没有容器的概念?理解这些问题对于日后的计算集群运维和开发都有重要的意义。而了解这些,需要从创建子进程说起。

Read more »

玩玩大糖帝国

Posted on 2019-03-09 | In Python | Visitors:

本文主要针对来自“西西河”论坛的名帖“大糖帝国(知乎链接)”进行实现,西西河的原文链接目前404了。大糖帝国这篇文章内容是由淮夷”提取自《The Origin of Wealth》书中的一个章节中提及的一个简单的经济学模型,并且淮夷追加了一些自己的观点。文章翻译了这本书中的Sugarscape这个章节,我个人觉得中文翻译要比原书的英文内容描述的更加精彩。这个著名游戏是1996年美国布鲁金斯研究所的Epstein和Axtell设计的,这两位号称是用计算机程序模拟经济演化的先驱。非常遗憾书的原作者和西西河的翻译者都没有提供模型的源代码,因为模型很简洁并且看起来非常具有可玩性,所以我决定使用Python自己实现这个模型,对文章数据进行验证,并简单记录实现方案。

Read more »

TCP SYN Flood Simulation With Python

Posted on 2019-01-26 | In Network | Visitors:

The main content of this topic is to simulate a TCP syn flood attack against my Aliyun host in order to have some tests. With the help of the kamene framework which also known as scapy3, I’ll craft some IP packets as we always did with Rawsocket of C under unix years ago, at the same time to notes some concerns during this process, including how it works, the network topology, the usage of kamene, the configuration of the firewall, and the packets dump of the server.

Read more »

NBIoT App System Demo Implementation With Python

Posted on 2019-01-19 | In Network | Visitors:

The narrow band internet of things is coming, as known as NBIoT, which is used for machine to machine communications. Examples are devices for meter reading like electricity, gas, or water consumption. They are often stationary, thus need not an optimized handover. Only a small amount of data is usually transferred, which is even not delay sensitive. However, the number of these devices may become quite big, even up to several orders of magnitude compared to the traditional devices. NB-IoT network is consist of terminal devices, radio access network, core network, IoT server platform and user applications. This part focuses on the IoT server platform and user applications.

Read more »

一道小学6年级的数学题

Posted on 2018-12-14 | In Math | Visitors:

已知圆的半径为4,等边三角形的边长为10,且图中三部分阴影部分面积相等,求阴影部分的面积。(6年级),这道六年级的数学题,小学六年级的知识肯定是不会做的,除非使用量角器,并且同时量出来的角度是90度,解这个题并不需要多深的数学知识,之所以记录下来是因为我自己解这道题时思考的顺序很有意思。

Read more »

Fundamental theorem of calculus

Posted on 2016-03-08 | In Math | Visitors:

Why the fundamental theorem of calculus is gorgeous? In the ancient history, it’s easy to calculate the areas like triangles, circles, rectangles or shapes which are consist of the previous ones, even some genius can calculate the area which is under a closed region of a parabola boundary by indefinitely exhaustive method. Actually it’s the calculation of integrals with the help of the definition of definite calculus. Such as we caculate the area bounded by the \(f(x)=x^2\), axis \(x\) and axis \(y\), which is OAB.

Read more »
123
toto

toto

About Math, About CS.

22 posts
5 categories
RSS
GitHub E-Mail Twitter Skype
© 2015 — 2021 toto.zhang@gmail.com