enterprise use case webinar - paas metering and monitoring

53
Enterprise Use Case – PaaS Metering & Monitoring Sinthuja Rajendran Software Engineer WSO2 Inc Gihan Anuruddha Senior Software Engineer WSO2 Inc

Upload: wso2

Post on 17-Dec-2014

514 views

Category:

Technology


3 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Enterprise Use Case – PaaS Metering & Monitoring

Sinthuja Rajendran Software Engineer WSO2 Inc

Gihan Anuruddha Senior Software Engineer WSO2 Inc

Page 2: Enterprise Use Case Webinar - PaaS Metering and Monitoring

About WSO2

•  Providing the only complete open source componentized cloud platform

–  Dedicated to removing all the stumbling blocks to enterprise agility –  Enabling you to focus on business logic and business value

•  Recognized by leading analyst firms as visionaries and leaders –  Gartner cites WSO2 as visionaries in all 3 categories of application

infrastructure –  Forrester places WSO2 in top 2 for API Management

•  Global corporation with offices in USA, UK & Sri Lanka

–  200+ employees and growing

•  Business model of selling comprehensive support & maintenance for our products

Page 3: Enterprise Use Case Webinar - PaaS Metering and Monitoring

150+ globally positioned support customers

Page 4: Enterprise Use Case Webinar - PaaS Metering and Monitoring

IaaS, SaaS, PaaS

•  Software as a Service(SaaS): applications that are available for use without having to buy, deploy and manage.

•  Platform as a Service (PaaS): middleware

that offers a computing platform which leverages an un-derlying IaaS and is the basis for building SaaS applications.

•  Infrastructure as a Service (IaaS): low-level

computing resources such as CPU, memory, storage and networking

Page 5: Enterprise Use Case Webinar - PaaS Metering and Monitoring

What is PaaS?

•  It stands for platform-as-a-service. At a high-level, a PaaS helps organizations, specifically developers, realize the benefits of cloud computing by providing a fast and scalable way to host applications in the cloud.

•  a PaaS is an Application Platform comprised of an operating system,

middleware and other software that allows applications to run on the cloud with much of the management, security, scaling and other stack related headaches abstracted away.

•  Along with software as a service (SaaS) and infrastructure as a service

(IaaS), it is a service model of cloud computing.

•  In this model, the user creates the software using tools and/or libraries from the provider. The user also controls software deployment and configuration settings. The provider provides the networks, servers, storage, and other services.

Page 6: Enterprise Use Case Webinar - PaaS Metering and Monitoring
Page 7: Enterprise Use Case Webinar - PaaS Metering and Monitoring

PaaS Deployment Model

In Public • PaaS available on the Internet • Use one of the cloud service providers • Information is stored and managed by provider under SLA In Private • Have a cloud, in-house • IaaS provides by hardware on your data centers • PaaS running on your IaaS • SaaS executing on your PaaS Or use both • Hybrid Cloud

Page 8: Enterprise Use Case Webinar - PaaS Metering and Monitoring

What is SLive - Stratos Live?

•  Publicly Hosted PaaS.

'WSO2 Stratos is a complete SOA and developer platform offered as a self-service, multi-tenant, elastic runtime for private and public cloud infrastructures'

Page 9: Enterprise Use Case Webinar - PaaS Metering and Monitoring

SLive

Page 10: Enterprise Use Case Webinar - PaaS Metering and Monitoring

SLive Deployment

Page 11: Enterprise Use Case Webinar - PaaS Metering and Monitoring

In PaaS ..

•  Throttling

q When hosting a cloud, you have to be aware of the multi-tenant aspect which can cause problems in consuming cloud resources.

q  A large number of users may using the cloud environment in different ways.

q  At any circumstance If a user is consuming too much of your resources,

it can cause problems to your entire cloud environment.

q We have to control the user's behaviour or you have to scale up your resources to cater the situation and then charge the user for consuming resources.

Page 12: Enterprise Use Case Webinar - PaaS Metering and Monitoring

In PaaS.. (cont..)

•  Security Related Issues

q  Security and data privacy are major concerns of cloud consumers when hosting their sensitive data, applications and performing critical operations/transactions in the cloud.

q On the other hand, it is a major challenge for cloud providers to meet

security, trust and privacy requirements of their clients.

q  Following can be identified as some of the main security challenges among many others,

a.  Physical security b.  Availability c.  Data isolation and protection d.  Execution isolation, logic isolation e.  Malicious code f.  Identity management

Page 13: Enterprise Use Case Webinar - PaaS Metering and Monitoring

In PaaS.. (cont..)

•  QoS

q All users subscribed to the same usage plan has to be served with same QoS

q Guaranteed QoS

q Throttle the excess usage of resource and maintain the QoS in the public cloud is important

Page 14: Enterprise Use Case Webinar - PaaS Metering and Monitoring

In PaaS.. (cont..)

•  Billing

q When hosting a public cloud, it is necessary to bill the users for consuming the cloud resources.

q It is how you get to earn money for offering the cloud. It is

very important to bill the user for the correct usage, not less, nor more.

q If your values are wrong, users will loose their trust on your cloud deployment. On the other hand, users should be billed without any losses to the hosting party. Billing system has to be flexible too.

Page 15: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Need Metering & Monitoring...

Ø To cater the discussed important factors of PaaS, we need to have the 'Metering and Monitoring'.

•  Pay for the resource you have consumed - 'Pay for just what you use'

•  Identify frequently used applications •  Measure the application's resource utilization •  Security •  Monitor the traffic for the hosted application

Page 16: Enterprise Use Case Webinar - PaaS Metering and Monitoring

What to Meter in PaaS?

•  Bandwidth Usage o  Services, web application will be getting the requests, serve the

request and send back the response. Each of these operations are entitled to billing and throttling.

•  Storage usage

o  Since user doesn't have the explicit direct access to the actual infrastructure/Operating system in PaaS, there should be a way to monitor the actual usage of the Storage such as RDBMS, Cassandra used.

•  Registry Usage

o  Registry incoming data actions - put/ importResource/ restore o  Registry outgoing data actions - dump/ get

•  User count for a Tenant

Page 17: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Metering in SLive

BAM

Page 18: Enterprise Use Case Webinar - PaaS Metering and Monitoring

•  Usage Agent - The Usage Agent is responsible of measuring parameters and publishing them to WSO2 BAM Where we store data and monitor them. For each and every tenant, the agent measures some important parameters related to their usage of bandwidth and resources (Service/webApp bandwidth, Registry usage, User count).

•  Usage Summary Generator - Summery generator component is responsible

for summarizing captured data. After collecting raw data, we summarize periodically and store those records in database. Those records are available per hourly, monthly, daily, quarterly and annually basis.

•  Throttling Manager -Throttling manager periodically checks the usage

records (data captured by the usage agent mentioned above) available, evaluates throttling rules and defines sets of actions for each and every tenant. These actions contain what tenants can or cannot do and the error messages shown to them.

•  Throttling Agent - Throttling agent is acting as a supervising agent which

checks the actions taken by users. Basically, it checks registry entry for a given tenant (updated by throttling manager).

Page 19: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Usage Agent BAM Deployment architecture

Usage Agent

BAM Receiver

Cassandra Cluster

SS Server

Hadoop Cluster

Hive

BAM Analytics Engine

MySQL Server

Page 20: Enterprise Use Case Webinar - PaaS Metering and Monitoring

What to monitor in PaaS?

•  Logs

ü  Since there won't be any console access for the tenants using the PaaS, there should be log viewer which will give the indication about the current logs in their application/system.

ü  All application/system logs need to be viewed.

ü  Isolation of logs within users/applications.

Page 21: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Distributed Logging with WSO2 BAM

Page 22: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Distributed Logging with WSO2 BAM (Cont...)

•  Log4j appender •  BAM receiver •  Stored in cassandra cluster •  Hive job for summarize •  HDFS to save summarize log

Page 23: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Distributed Logging with WSO2 BAM (Cont...)

• Asynchronous and Non-Blocking Data publishing • Receives and Stores Log Events Cassandra Cluster which is

a highly scalable and Big Data Repository • Can be shared with WSO2 CEP for real time Log Event

analysis • High Performance

Page 24: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Logging in SLive

Page 25: Enterprise Use Case Webinar - PaaS Metering and Monitoring

What to monitor in PaaS? (Cont..)

•  Service Statistics

q There may be services hosted in the PaaS, and the users will be interested on the traffic they are getting on each services they have hosted.

q The following may be some interested statistics figures they are interested in.

q  Request/Response/Fault Count for a service in a Month/Day/Hour

q  Average Response Time of the Service Hosted in a Month/Day/Hour.

Page 26: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Service Statistics Monitoring With BAM in PaaS

MySql SS server Hive

Analyzer

Meta info

Job submit Summarize

data

Hadoop Cluster

Cassandra Cluster

BAM Receiver

Application Server

Cluster Publish Service statistics events

Page 27: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Service Statistics Monitoring in SLive

1.  Enable Service Stats Monitoring

Page 28: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Service Statistics Monitoring in SLive (Cont..)

2. Create your Service Statistics Toolbox •  Download the service statistics toolbox from http://

wso2.com/products/business-activity-monitor/toolboxes/ •  Extract the toolbox and edit the Hive script as replacing

your tenant credentials.

Page 29: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Service Statistics Monitoring in SLive (Cont..)

3. Create your Database in SS •  Create Database

Page 30: Enterprise Use Case Webinar - PaaS Metering and Monitoring

•  Create privilege template if not any created so far.

Service Statistics Monitoring in SLive (Cont..)

Page 31: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Service Statistics Monitoring in SLive (Cont..)

•  Create a user for Database

Page 32: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Service Statistics Monitoring in SLive (Cont..)

•  Attach the user to the created database with created privileged template you wanted to grant

Page 33: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Service Statistics Monitoring in SLive (Cont..)

4. Create Datasource 'WSO2BAM_DATASOURCE' in WSO2 BAM for the database created in SS.

Page 34: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Service Statistics Monitoring in SLive (Cont..)

5. Install the modified toolbox

Page 35: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Service Statistics Monitoring in SLive (Cont..)

Now you can view your statistics. :)

Page 36: Enterprise Use Case Webinar - PaaS Metering and Monitoring

What to monitor in PaaS? (Cont..)

•  Proxy/Sequence/Endpoint Statistics

q There may be Proxy service hosted in the ESB, and the users will be interested on the traffic they are getting on each services they have hosted.

q The following may be some interested statistics figures they are interested in.

q  Request/Response/Fault Count for a Proxy/Sequence/Endpoint in a Month/Day/Hour

q  Average Response Time of the Proxy/Sequence/Endpoint in a Month/Day/Hour.

Page 37: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Mediation Statistics Monitoring in PaaS with BAM

MySql SS server Hive

Analyzer

Job submit Summarize

data

Hadoop Cluster

Cassandra Cluster

BAM Receiver

ESB Server Cluster

Publish Mediation statistics events

Page 38: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Mediation Statistics Monitoring in SLive

1.  Enable Service Statistics Monitoring

Page 39: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Mediation Statistics Monitoring in SLive (Cont..)

2. Create your Mediation Statistics Toolbox •  Download the mediation statistics toolbox from

http://wso2.com/products/business-activity-monitor/toolboxes/ •  Extract the toolbox and edit the Hive script as replacing your

tenant credentials.

Page 40: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Mediation Statistics Monitoring in SLive (Cont..)

3. Create your Database in SS •  Create Database

Page 41: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Mediation Statistics Monitoring in SLive (Cont..)

3. Create your Database in SS... •  Create privilege template if not any created so far.

Page 42: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Mediation Statistics Monitoring in SLive (Cont..)

3. Create your Database in SS... •  Create user and add privilege for that user

Page 43: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Mediation Statistics Monitoring in SLive (Cont..)

3. Create your Database in SS... •  Attach the user to the created database

Page 44: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Mediation Statistics Monitoring in SLive (Cont..)

3. Create your Database in SS...

Page 45: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Mediation Statistics Monitoring in SLive (Cont..)

4. Create Data Source 'WSO2BAM_DATASOURCE' in WSO2 BAM for the database created in SS.

Page 46: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Mediation Statistics Monitoring in SLive (Cont..)

5. Install the modified toolbox

Page 47: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Mediation Statistics Monitoring in SLive (Cont..)

Now you can view your statistics. :)

Page 48: Enterprise Use Case Webinar - PaaS Metering and Monitoring

What to monitor in PaaS? (Cont..)

•  API Call Statistics/Usage

q  In PaaS, tenant can create their own API and those APIs exposed to the outside world to access.

q  In this case, the API exposed by tenants need to be monitored and

the the following are some of the interested metrics.

q  Number of API Calls q  Number of Subscriptions for API q  Response time of APIs q  APIs last access times q  APIs access by version

Page 49: Enterprise Use Case Webinar - PaaS Metering and Monitoring

What to monitor in PaaS? (Cont..)

•  Storage Usage/Capacity

q Since user doesn't have the explicit direct access to the actual infrastructure/Operating system in PaaS, there should be a way to monitor the actual usage of the Storage such as RDBMS, Cassandra used.

q  With this monitoring the user will be able to control the usage of the storage according the to usage plan he/she has subscribed to.

Page 50: Enterprise Use Case Webinar - PaaS Metering and Monitoring

What to monitor in PaaS? (Cont..)

•  Bandwidth Usage q In PaaS users may have hosted the Services, Web

applications, etc.

q Services, web application will be getting the requests, serve the request and send back the response. Each of these operations are entitled to billing and throttling.

q Therefore users should be able to monitor this and view their current total, In/Out bandwidth.

Page 51: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Usage analysis with BAM

Usage Agent BAM Receiver Hive

Hadoop

Analytics Engine

Cassandra Cluster

SS Server

Usage Reports/billing

Page 52: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Questions?

Page 53: Enterprise Use Case Webinar - PaaS Metering and Monitoring

Engage with WSO2

•  Helping you get the most out of your deployments •  From project evaluation and inception to development

and going into production, WSO2 is your partner in ensuring 100% project success