当前位置:网站首页>Has my future been considered in the cloud native development route?
Has my future been considered in the cloud native development route?
2022-06-29 04:15:00 【Official account: Yunyuan ecosystem】
This article is for simple popularization only , The goal is to give people who have never or rarely been exposed to this aspect a little feeling , It's easier to read , The author knows that short stories can't really teach anything , So it's not going to happen RTFM(Read The Fucking Manual) The content of .
Concept
When it comes to cloud native (Cloud Native) Maybe some people will be strange , But if you say Serverless I believe many people will know , In fact, they are not equal .Serverless It's a concept or service delivery form , The goal is to block hardware and O & M details , Cloud native is a kind of specification and infrastructure to achieve such goals .
Further , Be situated between Docker Natural isolation and high efficiency , as well as Kubernetes Become a matter of fact Docker Standard of arrangement , Usually see the cloud native or Serverless The place of , Almost all of them are based on Docker + Kubernetes A practice of .
The road of evolution
It's too boring to talk about a single point , Let's see why there are cloud primitives from a historical point of view .
Docker
Make a statement first ,Docker Is a container technology ( It can be more specific namespaces and cgroups), instead of Virtualization technology , What's more common about true virtualization is Xen and KVM, Maybe some students are going to raise their hands : teacher , Then we often use VirtualBox and VMware It's virtualization ? Of course ! But most of the time , They are used in the area of desktop virtualization . Don't tear in a hurry , I'm talking about most , And there are a lot of virtualization solutions .
Maybe you often encounter such a scene before : Why can I run on you here ? Why can't we just run it now ? Finally solved , Most of them are caused by environmental inconsistencies . The environment here includes not only the development environment but also the operating system .
So when you give others code, you need to tell them the version of the operating system that the code can run , Versions of the various software on which it depends , Even the catalog 、 disk 、 Memory 、CPU There are requirements !
Of course, there is a more direct way to solve this problem , It's running code in a virtual machine , Then package the virtual machine !( Don't laugh. , In fact, someone did it ) Why do you laugh now , Because the virtual machine is too heavy , Both the packaged volume and the resources consumed at runtime are too heavy .
Is there a lighter one 「 virtual machine 」 Well ? Um. , As the title , But we call it containerization , characteristic :
- Process level isolation ;
- Except for the applications running in it, it hardly occupies the host resources ;
- Structured configuration files (Dockerfile);
- No state, no side effects ( Mainstream way );
- Hierarchical federated file system ;
- …
Docker Make the operating environment programmable !
Take a recent deployment Sourcegraph Take a chestnut for example , There's an official developer detailed list , A bunch of dependencies and environment settings , This deployment will explode , Fortunately, the government also provides a quick deployment image , It's that simple :
Kubernetes
Too long , hereinafter referred to as K8S, There are many similar abbreviations .
Docker It's very powerful , But in the eyes of adults, it's just children's toys , A slightly larger company may have more intimidating internal services , Especially after the popularity of microservice architecture .
Docker It only solves the delivery problem of a single service , An application with a complete form will inevitably involve various service dependencies , People who organize these dependencies will die .Docker Free us from all kinds of entanglements with the environment , But let us fall into a higher dimension of service dependence between the entanglement .
It's a Docker Users should think of solving this problem , As you wish , There is a situation of Three Kingdoms fighting for hegemony :Docker Swarm、Apache Mesos and Google Kubernetes, a certain extent K8S It has become the mainstream Docker Standard of arrangement . What's interesting is that K8S There is the meaning of the helmsman , and Docker It means container , So is it more reasonable to combine ?
More interesting ,K8S management Docker The process is also a layer of abstraction . To solve the scheduling of a set of closely related containers ,K8S The smallest scheduling unit of is Pod Not the container , The same Pod The resources of the containers in can access each other . in order to Manage Publishing 、 Roll back 、 Expansion and contraction capacity , On top of that, I Abstract another Deployment, Actually this is the most direct unit we use . To manage load balancing and scheduling , Another abstract is called Service.
The above concept is K8S Basic concepts , But I want to emphasize this : Many complex problems are solved in a layer of abstraction , There are a lot of things that can be said about this .
K8S The ultimate point is that all the above resources are managed through declarative configuration ,K8S Make container operation and maintenance programmable !
Cloud Native
Come here , If you want to use it directly in the production environment K8S Basically, it's OK , Let's talk about something else .
We all know Java The back end is widely used Web The frame is Spring MVC, That's a 02 It's old in ! Even if there is now Spring Boot, It can also be regarded as an upgrade , Compared with the three front-end frameworks that have blossomed in recent years, there are too many disputes .
A large part of the reason why a hundred flowers bloom is that the front end did not form a strong best practice at the beginning ! From an engineering point of view , Too many repeated wheels can easily lead to poor maintainability of the project .Web The back-end stability feature is less tolerant of such things , It's the same with the cloud .
Cloud origin is cloud ( Or in a narrow sense K8S Of ) Best practices , Born for clouds , The so-called cloud native !
To that end , And then there's CNCF( Cloud native Computing Foundation ), With organization, it's more reliable . This organization has a collection of ( Or hatch ) With a variety of best practices Cloud original Panoramic Map . such as , A more interesting one is helm, As K8S Application package manager , It puts a K8S The application is abstracted into a package , One click can deploy an application , Like many package managers , It's also active KubeApps Hub( There's even something provided by Alibaba cloud Domestic source ).
Serverless
With cloud native , Basic business scenarios can find the right best practices ,Serverless That's one of them . I don 't understand why the word was translated into : No server architecture ,Serverless What's blocked is operation and maintenance , So called No operation and maintenance structure is more appropriate . Unable to accept its Chinese translation , It's still used in the article Serverless.
You may be curious , Why is it necessary to put Serverless Pull it out alone and say , Because this is CNCF My darling !CNCF There are too many projects in the category , But most of them are hard , It's hard to use and land ordinary business , So I caught a typical one that could land on the ground , I also drafted a white paper , It is suggested that those who are interested can enjoy the details .
Before we talk about shielding operation and maintenance , Let's review what operation and maintenance generally includes :
- The server 、 The Internet 、 Physical resources such as storage (IaaS) apply ;
- test 、 Release 、 Expansion and contraction capacity ;
- monitor 、 journal ;
- …
In order to achieve shielding operation and maintenance, we don 't need to care about the above points , At present, the mainstream forms of the industry are BaaS and FaaS:
- BaaS(Backend as a Service): This service approach is to abstract common back-end services , For example, data storage 、 File store 、 News, etc. , Clients use these services as if they were using normal SDK/API.
- FaaS(Function as a Service):BaaS Only in most scenes , Some special scenes may be more troublesome , Some capabilities may not provide , But it has to be written on the back end . It's not necessary to care about the whole back-end code framework , So we can abstract and simple one by one function Let users complete . at present Google It's using Knative, Here is a comparison of other solutions .
The specific method depends on the business form , Basically, it's flexibility for convenience , Give all kinds of cloud services a flexibility ranking :IaaS( All kinds of virtual machines ) > CaaS(Docker Wait for container service ) > PaaS(BAE、SAE、GAE etc. APP Engine) > FaaS > BaaS > SaaS( Various Web APP, Such as Google Doc).
Askew cloud computing nine tier architecture , The dark color is left for the user to customize , inspiration source
Serverless It provides a kind of cloud service with shielding operation and maintenance and flexibility for developers .
The industry status quo
This article only focuses on cloud native related products , namely Docker/K8S Products above , Here are some of the mainstream products :
- K8S && CaaS
- Google Kubernetes Engine
- Google Cloud Run
- Amazon EKS
- Azure AKS
- Alibaba cloud container service
- FaaS
- Google Cloud Functions
- AWS Lambda
- ZEIT Now
- Alibaba cloud functional Computing
- BaaS
- LeanCloud
- BaaS + FaaS
- Alicloud applet cloud
You can experience it if you have the conditions , I'll give you two real examples :
- In addition to seeing a lot of public cloud services , There are many other services that are not suitable for public cloud , Need to privatize deployment . Remember to do a project for a unit before , The system was installed at the time of delivery 、 Install software , And various on-site joint commissioning , It's been a long time . Now use Docker + K8S Delivery is very easy , Just one set K8S colony , Everything else Docker Image packing belt past , A configuration file makes choreography easy !
- Think about the system you did , Is not a lot of almost no one used , But still not offline ? Is it possible that some systems have only a few interfaces and also need to go through the process from the application machine to the application of various middleware ? Let's call these long tail applications , These applications are an important factor in the weight of the team's historical burden . If the FaaS or BaaS Way to do it , You will find a new life , And the related supporting facilities , The mainstream of the industry is CLI and WebIDE, No matter what kind of , It will make you feel good .
Although the above two examples only reflect part of the current situation of the industry , Can be seen .
summary
This paper briefly introduces some basic concepts of cloud primitiveness , From the perspective of evolution, it explains why there are cloud natives , The essence is abstraction and then abstraction , Finally, the main current situation at home and abroad is surveyed , I hope you feel a little bit , Further understanding requires the reader to practice .
边栏推荐
- PostgreSQL 出现cross-database references are not implemented的bug
- Multi machine LAN office artifact rustdesk use push!!!
- Pytorch read / write file
- [C language] explain the thread recycling function pthread_ join
- Build a simple website by yourself
- Log in to the MySQL database and view the version number on the command line
- 【C语言】解决 “address of stack memory associated with local variable ‘num‘ returned”
- 【FPGA数学公式】使用FPGA实现常用数学公式
- 技术:如何设计zkVM电路
- ECS 4 sync point, write group, version number
猜你喜欢

Five thousand years of China

New listing of operation light 3.0 -- a sincere work of self subversion across the times

访问数据库时出现错误
![[Brillouin phenomenon] Study on simultaneous measurement system of Brillouin temperature and strain distribution in optical fiber](/img/92/57792ef733964230d36e0b9bb218b4.png)
[Brillouin phenomenon] Study on simultaneous measurement system of Brillouin temperature and strain distribution in optical fiber

Apifox : 不仅是Api调试工具,更是开发团队的协作神器

Libuv library overview and comparison of libevent, libev and libuv (Reprint)

干货丨微服务架构是什么?有哪些优点和不足?
![[C language] address of stack memory associated with local variable 'num' returned](/img/34/f8cf86a18ed461b25073b740dece45.png)
[C language] address of stack memory associated with local variable 'num' returned

树莓派用VNC Viewer方式远程连接

【FPGA数学公式】使用FPGA实现常用数学公式
随机推荐
How to keep database and cache consistent
ECS 四 Sync Point、Write Group、Version Number
技术:如何设计zkVM电路
pytorch 读写文件
Nuxt - 每个页面单独设置 SEO 相关标签及网页标题、图标等(页面配置 head)
[Brillouin phenomenon] Study on simultaneous measurement system of Brillouin temperature and strain distribution in optical fiber
Apifox : 不仅是Api调试工具,更是开发团队的协作神器
044. (2.13) add value to yourself
IDEA修改jvm内存
1018 hammer scissors cloth
【C语言】开启一个线程
Call snapstateon closed sou from Oracle CDC
Analysis of moudo Network Library
HCIE-Security Day41:理论学习:信息收集与网络探测
The great gods take connections from the MySQL connection pool in the open of the rich function. The initialization of the connection pool is 20. If the parallelism of the rich function is 1
我的创作纪念日
Is the sink usually the JDBC insert update delete?
Mécanisme d'attention du canal de fixation
Cloud native weekly | grafana 9 was officially released; The Chinese version of cloud native vocabulary is now online
Nuxt - set SEO related tags, page titles, icons, etc. separately for each page (page configuration head)