Development and running platform of distributed web service

Level 7 Reverse Proxy

The outermost of SAE’s architecture is Level 7(OSI), which provides load balance and health check, etc.

This is an http reverse proxy, mainly taking charge of responding to user’s HTTP request, analyzing and forwarding it to the backend web server pools.

Load Balance

SAE servers’ architecture is distributed, so this means we need load balance for these servers to ensure each request’s quick response.

Load balance is mainly used in proxy and forwarding. When user’s request reaches Level 7, load balance analyses it and then forwards it to the server whose load is lower.

Health Check

Level 7 will check up backend servers’ status automatically. If Level 7 doesn’t receive server’s feedback for a certain while, it will identify this server as unavailable and won’t forward request to it any more.

Distributed deployment

SAE’s web servers take the distributed code deployment way. Developers submit code to the Deploy Front, and then the code will be synchronously deployed to all SAE’s web servers, just like every server gets one copy of the code. If some web servers were dead, client’s request could also be redirected to another living one in order not to affect the application’s running. This will greatly improve the app’s stability.

In addition, SAE also provides an entire distributed web service solution, including distributed database, distributed file system, distributed timing service, page fetching and image service, etc.

Sandbox

SAE, as a public cloud platform, will first face the problem of application’s isolation. Without good isolation, the platform would not operate long-term stably. SAE sandbox isolates the application in its own secure and reliable environment, showing in the following aspects:

  • Code and data isolation
  • Network isolation
  • Memory isolation
  • CPU isolation

SAE has supported three kinds of language now

Distributed Cache: SAE Memcache

SAE Memcache is a distributed cache service, provided by SinaAppEngine to store user’s small amount of data by shared ways.

As SAE’s web service environment is distributed, SAE Memcache is supposed to be enabled when users need to cache small-structure data, like key-value. This can provide quick data access response and reduce the backend storage pressure.

SAE Memcache system is a general memcache pool. Every user who is going to use Memcache will face the entire service system instead of one single Memcache instance.

Weakness of Traditional Memcache

1.As for cutting cost, personal or small business’ Memcache cache pool capacity is limited; this increases the downtime cache penetration probability.

2.High risk of expansion, usually when cache capacity is insufficient, additional cache is needed. And adding more instance means the hash rule of client also need to be changed. So even if using consistent hash, losing cache would also happen.

3.In traditional Memcache, all the users share one LRU link; this would cause interference between user data exchange, like A’s data might be replaced by B’s. So we need to install different Memcache instances to keep these distinct LRU links.

Advantages of SAE's Memcache

1.SAE Memcache system is running in the enterprise-scale cache pools. The enormous capacity buffer pools will keep the cache penetration percentage at a very low level.

2.Smooth expansion. SAE Memcache can adjust dynamically. Expansion is completed simply by setting up the cache capacity, without changing hash rule or losing records. Users don’t need to care about the cache capacity estimation, because the adjustment is zero cost.

3.Domain supported. Different domains have distinct memory limit and LRU. Developers can set up memory limit according to data importance, and these data LRU links won’t be interfered by each other.

MySQL

SAE supports nearly all the characters of MySQL. Users can create database schemas and tables on SAE and manage them through standard MySQL client; this entire process has no difference compared with the original MySQL, therefore we don’t need any code modification.

Additionally, each MySQL group contains one master database, several slaves and one for backup. This can greatly improve the database performance and ensure data reliability.

RDC

RDC (Relational Database Cluster) is a distributed database cluster system. It is mainly used to support SAE’s relational database cluster. For present, RDC’s backend is MySQL. We can simply recognize RDC as MySQL middle layer or proxy layer, like MySQL Proxy. All the SQL requests are sent to the backend by RDC. RDC can support ten million of the database backend and can be distributed horizontally expanded.

KVDB(NoSQL)

As traditional relational database’s scalability is not that satisfied in distributed environment, NoSQL has gradually come into our vision. And because more and more developers are getting used to take NoSQL as usual database development tool, SAE also provides NoSQL service to meet this requirement.

KVDB is a distributed key-value storage service developed by SAE, to support the large amount of key-value data storage on public cloud platform. KVDB has massive storage capacity, 100G for each developer, supporting about one billion records. Developers can use KVDB to store simple-structure data, like friend relationship.

KVDB has high performance and high reliability. According to our benchmark, the speed for both reading and writing can reach up to 100,000 queries per second. KVDB is running under the structure of one master and several slaves. SAE provides hot backup and regularly cold backup. When some database was dead, we would switch to a living one automatically.

Data Reliability

For data service, SAE mainly uses replication to ensure the high reliability. SAE’s data storage service adopts two kinds of replication, the active and the passive. For instance, the synchronization between master and slave Binlog on SAE is typical passive replication: User’s task request is read into the master database, and be synchronized to the slave by backend process. Once the master was down, the slave would be quickly switched as master. In addition, some of SAE’s service use active replication (double-write) to ensure the HA, like Cron. When developers set up a Cron in configuration file, appconfig.yaml, the information of this timing task will be double-written into several persistent databases for later execution.

Code Security

Every APP is running separately in SAE’s runtime environment. Application cannot jump over the sandbox to get others’ code, which is the insurance for code security.

Apart from the password, security code is also needed when deploying code online or through SVN and this is a plus for code security.

App Firewall

Every application might face the problems of being attacked and malicious fetched from unidentified IP, mainly shown in two aspects: app data leakage and bandwidth over-consumption. SAE’s App firewall is designed to solve this problem. Developers can limit certain IP’s visit frequency (minute/hour/day) and network flow at the control panel, and effectively protect our own application data and bandwidth by setting black/white lists.

App Health Check

The application level problems are mainly caused by user’s code security defect, which include SQL injection, cross site script and Trojan linked. As a solution, SAE provides the APP Health Check service to detect code security problems and will inform you the result directly.

Security Code Protection Mechanism

Besides developers need to enhance our own cyber-security awareness and strengthen the computer security, SAE also provides a security code protection mechanism. First, SAE will check the security code’s login IP; validate the cell phone number for IP from another region. Second, if users want a higher level security, you can apply for SAE cell phone dynamic password as a replace of security code.

Cron

Cron is the crontab service developed by SAE. Clients who want to set up triggers for certain timing actions may use this, like regular ranking and so on. Cron’s excitation is triggered in HTTP ways, while what’s really executed is code from developer’s apps. Cron is deployed in distributed environment with high reliability, and is isolated between each other. Different points are triggered at the same time but only one is to be executed after distributed lock’s election.

TaskQueue

TaskQueue is designed by SAE for developers to execute a list of tasks sequentially by asynchronous HTTP ways. First, users need to create a queue at online management platform, and then push tasks into it which will be executed right after pushed. TaskQueue’s job execution is achieved by HTTP methods and what really executed is code from developer’s apps. So the execution is limited by the longest time of HTTP. TaskQueue is deployed in distributed environment with high reliability. Each worker is isolated from the others and spontaneously executes the task.

DeferredJob

DefferedJob is for developers to configure an off-line task execution schedule. It is not limited by HTTP longest execution time, which is the main difference from TaskQueue. This is because DefferedJob is executed at system level language so there is no time limit; while TaskQueue is triggered by HTTP methods.

Storage

torage is a distributed service is for developers to keep persistent file. Users can read, write and get file property or list through API (Application Programming Interface).

Cloud-storage service become easier to realize based upon SAE Storage.

Data Security

    Storage provides several kinds of the data security insurance:

  • 1.Firewall,Users can limit the visit frequency and flow by setting up black/white list.
  • 2.Authority,Set the Storage authority as “private”. Those private data in Storage cannot be accessed through URL, only if passing the,secret key check.
  • 3.Security chain,Only the IP in your white lists can get access to the data in Storage.

CDN

SAE has many multiplex backbone network (China Telecom, China Unicom, China Mobile and Education network line) CDN nodes covering nearly all China’s big cities. Now these nodes are opened for clients to use this high quality CDN service.

After enable CDN service, data in Storage will be pushed to every CDN nodes. Users will receive data from the nearest nodes when try to fetch it and this will greatly improve the access performance.

Short Messages

SINA Short Message Service is a comprehensive message service supported by SINA Wireless. Users can send short message via China Mobile, China Unicom or China Telecom network, and the arrival rate is above 90%.

Geography Location

Geo. Location service is usually used in the situation of searching routine, bus lines, IP location and maps.

Word Segment

Chinese Word Segmentation means divide certain sequence of Chinese characters into one-by-one words. It is the basis of text mining. Segmentation with higher accuracy for certain Chinese paragraph would help computers understand what those really mean. SAE’s word segmentation is the Chinese sentence analysis system developed based on Hidden Markov Model, which mainly includes Chinese word segmentation, part-of-speech tagging, named entity recognition and new word identification.

All these apps/websites are running on SAE.

-微游戏 CEO 徐城(@徐诚Season) “借用新浪云计算SAE总监王利俊(@IT人)微博上的一句话:'因微游戏平台部署在SAE上,运行在SAE云主机上的游戏,在调用微游戏openapi时将会得到飞一样的体验!',希望未来SAE的云主机服务能助力微游戏及合作伙伴们跑得更稳,飞得更高!”
应用名称: 微游戏
-北京炫游在线网络技术有限公司 CEO 赵立元 “SAE节省了我们大量成本,不用自己管理服务器,按需付费,也不用担心用户量激增:)”
-北外信息技术中心工程师 连淑娟 “SAE方便快捷、简单易用,节约管理成本。”
-百体(北京)网络科技有限公司 总经理 刘冠廷 “SAE提供的优质服务,使我们的开发更高效!”
应用名称: 百体
-微博士开发团队 技术负责人 单鑫鑫 “使用SAE服务已经一年有余,SAE在带宽速度、服务支持上有着明显的优势。”
-成都商报 技术负责人 邱岭 “感谢SAE在传统媒体转型浪潮中的助力。”
应用名称: 成都商报
App Url: Inconvenience to public
-郑州晚报财经新闻中心 副主任 王绍禹 “SAE服务贴心。”
应用名称: 郑州晚报
App Url: Inconvenience to public
-上海互广电子商务有限公司 CEO 杨晨 “SAE(企业版)的性价比很好,很适合我们这样创业型企业降低运营成本,提高开发效率!”
应用名称: 上海互广
App Url: Inconvenience to public
  • 微游戏
  • 微三国
  • 北京外国语大学
  • 百体
  • 转发抽奖平台
  • 成都商报
  • 郑州晚报
  • 上海互广

Total488250Applications