5 Ways to use Node in the Network

15
5 Ways to Use Node in the Network

Transcript of 5 Ways to use Node in the Network

Page 1: 5 Ways to use Node in the Network

5 Ways to Use Node in the Network

Page 2: 5 Ways to use Node in the Network

1. API Metering Also called API rate limiting, metering is the process of managing access to APIs, and only allowing a given number of API calls per specified time period.

Page 3: 5 Ways to use Node in the Network

3LineRate.com

X-API-Key:

12345

API METERING

node.js

• Extract API key from HTTP header

• Lookup (service or database) current usage and quota

• Determine whether call allowed or reject with appropriate message

MORE EFFICIENT

IMPROVES PERFORMANCE

LESS DISRUPTION WHEN CHANGED

Page 4: 5 Ways to use Node in the Network

2. Y-axis scalingY-axis scaling is a sharding-based routing pattern that uses some variable within each request - either in the URI or in the HTTP headers - to determine which service or application instance a request should be forwarded to.

Page 5: 5 Ways to use Node in the Network

5LineRate.com

Y-AXIS SCALING

Service A

Service B

Service C

/login/

/checkout/

/search/

node.js

• Evaluate URI

• Steer to the appropriate service based on function

• Can be extended to pull service name from database for real-time updates

MORE EFFICIENT

IMPROVES PERFORMANCE

BETTER ABSTRACTION

Page 6: 5 Ways to use Node in the Network

3. Data scrubbing Data scrubbing is a security technique that ensures sensitive or confidential data is not returned to the user.

Page 7: 5 Ways to use Node in the Network

7LineRate.com

DATA SCRUBBING

Service A

Service B

Service C

node.js

• Intercept response

• If specified pattern / data is discovered, remove or scrub to obfuscate

• Return clean data to user

{username: “Joe Bob”,

account: “123-45-678”}

{username: “Joe Bob”,

account: “xxx-xx-678”}

COMPLIANCE

SECURITY

LESS DISRUPTION WHEN CHANGED

Page 8: 5 Ways to use Node in the Network

4. Exception Handling Exception handling allows the app proxy to “retry” requests to app instances that fail. This is particularly useful in cases where 5xx and 4xxx error messages are returned and indicate a problem with the web server or app instance.

Page 9: 5 Ways to use Node in the Network

9LineRate.com

EXCEPTION HANDLING

node.js

• Intercept response

• If HTTP response matches specified status codes retry the request and mark the original as unavailable

• May perform additional logging or actions as indicated by the script

GET /original-request/

IMPROVE UPTIME

FASTER NOTIFICATION

BETTER USER EXPERIENCE

(RETRY) GET /original-request/

Page 10: 5 Ways to use Node in the Network

5. Content Sharding Similar to Y-axis scaling, content sharding allows for finer grained distribution of requests based on content type such as images, documents, static text or database-backed content.

Page 11: 5 Ways to use Node in the Network

11LineRate.com

CONTENT SHARDING

Images

Static text

Scripts

node.js

• Evaluate URI and/or Content-Type HTTP header

• Steer to the appropriate service based on content type

• Can be extended to pull service name from database for real-time updates

IMPROVE SCALABILITY

IMPROVED PERFORMANCE

BETTER USER EXPERIENCE

Page 12: 5 Ways to use Node in the Network

How do I get node in the network?

Page 13: 5 Ways to use Node in the Network

13

With a programmable proxy like LineRate

Data PathData path

programmability enables

custom application data

and traffic handling logic

Node.js

• Deployed in the data path between an end user and the application

• Fluent in SSL and HTTP

• Can execute custom logic using node.js (including modules from NPM)

LINE RATE

NODE.JS

Page 14: 5 Ways to use Node in the Network

Where can I get one? linerate.f5.com

Page 15: 5 Ways to use Node in the Network

15

https://linerate.f5.com/try