笔记:Cost Reduction Strategies on Java Cloud Hosting Services

简介:

估计这篇文章的名字会让许多上云的人感兴趣:减少Java云主机服务费用的策略,主要介绍的就是通过使用容器技术降低Java云服务器的费用。

Key Takeaways

As your project grows you need to move to larger VMs. But if the next step up exceeds your requirements, you are overpaying
Containers offer higher granularity than VM's, and can be scaled vertically without rebooting the running instances
Monolithic and legacy applications can be migrated from VMs to system containers without modifying your settings
Scaling Java vertically requires proper JVM configurations, and the shrinking garbage collector
"Pay as you go" vs "Pay as you use" cloud pricing models and the right choice to increase efficiency

开篇就是:你为VM(Virtual Machine)多付钱了(Admit That You Overpay for VMs),如下图所示,作者认为粉的这部分都是浪费的。
screenshot

随着项目垂直扩展,问题越来越大。而如果扩容的话,现在的云服务器几乎都是一倍一倍的扩,造成更大的浪费。

解决方案就是使用容器技术(Migrate from VMs to Containers)以及优化垃圾回收策略(Enable Garbage Collector with Memory Shrink)
容器化的好处:Now each container can be scaled up and down on the fly with no downtime. It is much thinner compared to virtual machines, so this operation takes much less time compared to scaling with VMs. And the horizontal scaling process became very granular and smooth, as a container can be easily provisioned from the scratch or cloned.
回收策略优化的好处,从:
screenshot

变成:
screenshot

在与容器技术结合,将释放的内存供其它容器使用,增加内存利用率。

原文链接:https://www.infoq.com/articles/java-cloud-cost-reduction

相关文章
|
5天前
|
设计模式 Java 关系型数据库
【Java笔记+踩坑汇总】Java基础+JavaWeb+SSM+SpringBoot+SpringCloud+瑞吉外卖/谷粒商城/学成在线+设计模式+面试题汇总+性能调优/架构设计+源码解析
本文是“Java学习路线”专栏的导航文章,目标是为Java初学者和初中高级工程师提供一套完整的Java学习路线。
|
6天前
|
设计模式 Java 关系型数据库
【Java笔记+踩坑】设计模式——原型模式
对比原型模式和传统方式的实现思路、代码方案、优缺点,阐述原型模式的使用场景,以及深拷贝、浅拷贝等相关概念,并扩展原型模式在Spring源码中的应用。
【Java笔记+踩坑】设计模式——原型模式
|
6天前
|
Java 开发者 数据格式
【Java笔记+踩坑】SpringBoot基础4——原理篇
bean的8种加载方式,自动配置原理、自定义starter开发、SpringBoot程序启动流程解析
【Java笔记+踩坑】SpringBoot基础4——原理篇
消息中间件 缓存 监控
21 0
|
6天前
|
运维 Java 关系型数据库
【Java笔记+踩坑】SpringBoot基础2——运维实用
SpringBoot程序的打包与运行、临时配置、多环境配置、日志
【Java笔记+踩坑】SpringBoot基础2——运维实用
|
6天前
|
Java 数据库连接 API
【Java笔记+踩坑】Spring Data JPA
从常用注解、实体类和各层编写方法入手,详细介绍JPA框架在增删改查等方面的基本用法,以及填充用户名日期、分页查询等高级用法。
【Java笔记+踩坑】Spring Data JPA
|
6天前
|
SQL Java 数据库连接
【Java笔记+踩坑】MyBatisPlus基础
MyBatisPlus简介、标准数据层开发CRUD、业务层继承IService、ServiceImpl、条件查询、LambdaQueryWrapper、id生成策略、逻辑删除、乐观锁@Version、代码生成器、ActiveRecord
【Java笔记+踩坑】MyBatisPlus基础
|
6天前
|
前端开发 Java 数据库连接
【Java笔记+踩坑】SpringBoot——基础
springboot三种配置文件及其优先级、多环境配置、springboot整合junit,mybatis、ssmp综合图书案例
【Java笔记+踩坑】SpringBoot——基础
|
6天前
|
Java 数据库连接 Maven
【Java笔记+踩坑】Maven高级
分模块开发、依赖传递与冲突问题、 可选依赖和排除依赖、聚合和继承、属性、多环境配置与应用、私服安装和使用
【Java笔记+踩坑】Maven高级
|
6天前
|
前端开发 Java 数据库连接
【Java笔记+踩坑】SSM整合
统一结果封装、统一异常处理、整合图书案例、拦截器
【Java笔记+踩坑】SSM整合