Poor code spends money on cloud services

Source: Internet
Author: User
Keywords Cloud Services

Running a Web site on the cloud and spending a few cents on the CPU time to configure your application is an appealing approach. What I want to say is that all of us should configure our own applications, right? The main thing is to really focus on what the CPU does and how many databases it connects, how much memory is used, but we don't actually do that. If the code doesn't affect your money bag, you're hardly going to talk about it.

Interestingly, I found myself executing the http://www.aliyun.com/zixun/aggregation/14109.html > Performance Optimization Plan whether I was driving a hybrid or dealing with limited data from smartphones. When there is a real shortage of resources and the (most important) amount of money is about to be consumed, the sensible and obvious approach is to optimize the program and reduce costs.

Poor code spends money in the cloud

I ordered MSDN Subscription, which includes quite a lot of free azure cloud time. If you have your own MSDN, make sure you have it open. This order is for my personal account, I need to renew it (I do not have a free pass only because I serve the cloud organization), so I want to spend as little money as possible.

A classic and obvious rule for reducing the system is "do less and do as much less". When you buy your host system in the cloud using this method, what you want to do is to save as much of your dollars as possible. You pay CPU time, pay the bandwidth and pay for database access – but it increases. If you loop through the database connection, the transfer will require more data than you actually need, and you'll pay for it.

I recently redesigned this blog with designer Jin Yang to make a new home page and Hanselminutes Podcast site. In the process I have an idea for pages that contain more personal files, to show my information and to display more visually the visitor information because of a duplicate name. I'm working on a 360+ to show and get a picture of each visitor.

I landed on the site and it felt really good. However, I immediately noticed that the volume of data was much higher than it used to be. I provide servers for MP3 elsewhere, and only a few hours into the new Web site, the light picture consumes nearly 500M of traffic.

You can guess from the chart when I landed on the site.

I have "little" to pay extra bandwidth, but that doesn't look good. One of the great features of Azure is that you can check your bills every day, not just at the end of the month. I can see a slow increase in bandwidth. At this rate, the end of the month must pay an extra fee for the excess bandwidth.

I thought for a moment and realized immediately that I was loading the 360+ picture when someone clicked on the document page. Now, in retrospect, this is obvious. But remember I moved the site into the cloud for two reasons.

· Money

· Rapid expansion when needed

I gave all the database calls to the cache, which was trivial, but the image of the thing for a while. I can add pagination, or I can make an infinite scroll bar with "ethically in". People like to use CTRL on the page to find the information they want. But if the volume of data is not very large, I do not like this page. Narrator: My list includes adding "topic tagging" and client sorting and filtering on hanselminutes. I think it will be a good addition to the background catalog. I'm still looking for a better way to take advantage of the ever-increasing copy library. What do you think about that?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.