分类目录归档:存储 & Cache

存储与Cache

CentOS 6.x下配置iSCSI网络存储

一、简介

iSCSI(internet SCSI)技术由IBM公司研究开发,是一个供硬件设备使用的、可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运行SCSI协议,使其能够在诸如高速千兆以太网上进行路由选择。iSCSI技术是一种新储存技术,该技术是将现有SCSI接口与以太网络(Ethernet)技术结合,使服务器可与使用IP网络的储存装置互相交换资料。

iSCSI是一种基于TCP/IP 的协议,用来建立和管理IP存储设备、主机和客户机等之间的相互连接,并创建存储区域网络(SAN)。SAN 使得SCSI 协议应用于高速数据传输网络成为可能,这种传输以数据块级别(block-level)在多个数据存储网络间进行。SCSI 结构基于C/S模式,其通常应用环境是:设备互相靠近,并且这些设备由SCSI 总线连接。

iSCSI 的主要功能是在TCP/IP 网络上的主机系统(启动器 initiator)和存储设备(目标器 target)之间进行大量数据的封装和可靠传输过程。 继续阅读

Varnish 入门

本文将介绍 varnish 的工作流程,安装以及 varnish 的配置三个方面的内容。首先简单的介绍 varnish 以及其工作流程,大概了解其内部原理,然后介绍了 varnish 的安装方法,最后详细介绍了 varnish 的配置语言 VCL 以及如何对 VCL 进行调试。

Varnish 简介

Varnish 是一款高性能且开源的反向代理服务器和 HTTP 加速器,其采用全新的软件体系机构,和现在的硬件体系紧密配合,与传统的 squid 相比,varnish 具有性能更高、速度更快、管理更加方便等诸多优点,很多大型的网站都开始尝试使用 varnish 来替换 squid,这些都促进 varnish 迅速发展起来。

挪威的最大的在线报纸 Verdens Gang(vg.no) 使用 3 台 Varnish 代替了原来的 12 台 Squid,性能比以前更好,这是 Varnish 最成功的应用案例。 继续阅读

Varnish安装及调优

最近公司做活动推广,流量暴增,后端服务器压力山大,导致用户的请求响应时间延长,客户因此抱怨声音很大。
为尽快解决问题,在安排人员不断优化后端代码的同时,考虑在nginx前增加varnish缓存层,只透传部分动态请求过去,直接减少后端服务器的压力。
在实际使用中,真正感受到了varnish服务器强大的威力!在不断的调优缓存命中率后,后端服务器cpu直接从80%降到了20%,再大的并发前端也可以直接消化,后端服务器表示毫无压力。有了这玩意,可以再也不用在后台写定时任务,不断重新生成静态页面了,直接丢缓存里完事!此外,varnish还支持一种叫“神圣模式”,在后端服务器报错返回500的时候,varnish还能继续优先返回过去缓存的内容,为用户屏蔽部分错误,这东东有时真算是救命稻草啊。
但同时,也趟了n多的坑,varnish中的VCL语言太过强大和灵活,稍微运用不好就会中枪。而网上公开的大多数varnish配置文件都是一大抄,根本无法直接用于生产。在研究了几天,翻阅了大量各种资料后,才总算把遇到的问题都解决了。 继续阅读

深入探讨在集群环境中使用 EhCache 缓存系统

face9686a126c31e936870d7c956b970EhCache 是一个纯 Java 的进程内缓存框架,具有快速、精干等特点,是 Hibernate 中默认的 CacheProvider。本文充分的介绍了 EhCache 缓存系统对集群环境的支持以及使用方法。

EhCache 缓存系统简介

EhCache 是一个纯 Java 的进程内缓存框架,具有快速、精干等特点,是 Hibernate 中默认的 CacheProvider。

下图是 EhCache 在应用程序中的位置:

图 1. EhCache 应用架构图

图 1. EhCache 应用架构图

EhCache 的主要特性有:

  1. 快速;
  2. 简单;
  3. 多种缓存策略;
  4. 缓存数据有两级:内存和磁盘,因此无需担心容量问题;
  5. 缓存数据会在虚拟机重启的过程中写入磁盘;
  6. 可以通过 RMI、可插入 API 等方式进行分布式缓存;
  7. 具有缓存和缓存管理器的侦听接口;
  8. 支持多缓存管理器实例,以及一个实例的多个缓存区域;
  9. 提供 Hibernate 的缓存实现;
  10. 等等 …

继续阅读

Centralized Secure Storage (iSCSI) – “Initiator Client” Setup on RHEL/CentOS/Fedora – Part III

iSCSI Initiator are the clients which use to authenticated with iSCSI target servers to access the LUNs shared from target server. We can deploy any kind of Operating systems in those locally mounted Disks, just a single package need to be install to get authenticate with target server.

Client Initiator Setup

Client Initiator Setup

Features

  1. Can handle any kind of file systems in locally mounted Disk.
  2. No need of restating the system after partition using fdisk.

继续阅读

How to Create and Setup LUNs using LVM in “iSCSI Target Server” on RHEL/CentOS/Fedora – Part II

LUN is a Logical Unit Number, which shared from the iSCSI Storage Server. The Physical drive of iSCSI target server shares its drive to initiator over TCP/IP network. A Collection of drives called LUNs to form a large storage as SAN (Storage Area Network). In real environment LUNs are defined in LVM, if so it can be expandable as per space requirements.

Create LUNS using LVM in Target Server

Create LUNS using LVM in Target Server

Why LUNS are Used?

LUNS used for storage purpose, SAN Storage’s are build with mostly Groups of LUNS to become a pool, LUNs are Chunks of a Physical disk from target server. We can use LUNS as our systems Physical Disk to install Operating systems, LUNS are used in Clusters, Virtual servers, SAN etc. The main purpose of Using LUNS in Virtual servers for OS storage purpose. LUNS performance and reliability will be according to which kind of disk we using while creating a Target storage server. 继续阅读

Create Centralized Secure Storage using iSCSI Target on RHEL/CentOS/Fedora Part -I

iSCSI is a block level Protocol for sharing RAW Storage Devices over TCP/IP Networks, Sharing and accessing Storage over iSCSI, can be used with existing IP and Ethernet networks such as NICs, Switched, Routers etc. iSCSI target is a remote hard disk presented from an remote iSCSI server (or) target.

Install iSCSI Target in Linux

Install iSCSI Target in Linux

继续阅读

CentOS / Red Hat Linux: Install and manage iSCSI Volume

Internet SCSI (iSCSI) is a network protocol s that allows you to use of the SCSI protocol over TCP/IP networks. It is good alternative to Fibre Channel-based SANs. You can easily manage, mount and format iSCSI Volume under Linux. It allows access to SAN storage over Ethernet.

Open-iSCSI Project

Open-iSCSI project is a high-performance, transport independent, multi-platform implementation of iSCSI. Open-iSCSI is partitioned into user and kernel parts.

Instructions are tested on:
[a] RHEL 5
[b] CentOS 5
Fedora 7
[d] Debian / Ubuntu Linux 继续阅读

How to use the MegaCLI Utility with your RAID Controller on your PowerEdge Server in Linux

Article Summary: This article provides information on how to use the MegaCLI utility with your RAID controller on your PowerEdge server in Linux.


Table of Contents:

继续阅读