Slide 1

Slide 1 text

Building an enterprise-ready Lambda Experience Héctor Rodes, CTO @ Adhara Álex González, Head of Back @ BBVA Next

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

Context

Slide 4

Slide 4 text

❏ Financial services ❏ Presence in +10 countries ❏ 2 private data centers (America, Europe) ❏ +10K IT professionals ❏ Building internal cloud services since 2014

Slide 5

Slide 5 text

❏ Simplified compute experiences fully integrated with Bank tools including (but not limited to)... ❏ Containers as a service (based on k8s/openshift) ❏ “Google App Engine/Heroku” like service (based on k8s/openshift) Our team WAS offering

Slide 6

Slide 6 text

❏ Simplified compute experiences fully integrated with Bank tools including (but not limited to)... ❏ Containers as a service (based on k8s/openshift) ❏ “Google App Engine/Heroku” like service (based on k8s/openshift) ❏ Lambdas Our team IS offering

Slide 7

Slide 7 text

What do we want to achieve?

Slide 8

Slide 8 text

Enterprise

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

@ferdef, @abelgvidal, @javierprovecho & @robermorales

Slide 11

Slide 11 text

Industry constraints ❏ Financial regulated industry: Security, confidentiality, auditable, data location… Company constraints ❏ BBVA internal rules and tools (ex: distributed tracing collector, security and compliance checks, ... )

Slide 12

Slide 12 text

experience

Slide 13

Slide 13 text

We wanted a lambda experience similar to public cloud offering JUST THAT SIMPLE!

Slide 14

Slide 14 text

How we did it?

Slide 15

Slide 15 text

1.UX

Slide 16

Slide 16 text

Our API 1/2 Inspired by AWS Lambda on how to implement a function import io.e3r.lambda.context.Context; public class IdentityCardLetter { public String getIdentityCardLetter( String identityCardNumber, final Context context) { return “your code goes here”; } }

Slide 17

Slide 17 text

Our API 2/2 ❏ Inspired by Google Cloud Functions on how to manage the functions ❏ RESTful API ❏ Function resource to create, get, update, delete a function ❏ Execute function: .../namespace/{id}/function/{id}:[call|async-call] ❏ The big difference ❏ Code is pushed to git repositories (only allowed option) ❏ After code is pushed internal pipelines do their magic (mainly security and compliance)

Slide 18

Slide 18 text

Code Something happens URL

Slide 19

Slide 19 text

Our API 2/2 Example: Deploy your function curl -X POST https://lambda.domain -d { “code”:”[codeReference]”, “entryPoint”:”mypackage.MyClass.theFunction” }

Slide 20

Slide 20 text

2.Homemade vs Product

Slide 21

Slide 21 text

State of the art 1/2 ❏ First option was to use an existing solution. Some evaluated: Openwhisk, Openfaas, Knative, Kubeless… ❏ Problems not solved yet (or at least when we started) ❏ Easy extension to be integrated with BBVA tools (security, logs, tracing, monitoring, …) ❏ Multi region ❏ Multitenancy (BBVA-way) ❏ Security compliance ❏ GRPC

Slide 22

Slide 22 text

State of the art 2/2 ❏ We had an internal implementation of a compute service similar to Google App Engine / Heroku ❏ We had internal certified execution stacks ❏ Evolution of that service using the certified stacks was evaluated

Slide 23

Slide 23 text

Our decisions ❏ Offer the right UX “wrapping” the real implementation ❏ Evolve internal “App Engine” compute service to execute functions ❏ Use certified stacks as functions execution environment ❏ Keep evaluating products (future replacement of custom development without breaking the UX)

Slide 24

Slide 24 text

We want to build The context

Slide 25

Slide 25 text

May be it’s better

Slide 26

Slide 26 text

3.Control plane

Slide 27

Slide 27 text

Control Plane ❏ Main control plane to manage lambda lifecycle ❏ Caller Manager providing access to deployed lambdas

Slide 28

Slide 28 text

Your lambda Caller Manager Control plane admin call* manage Control plane Your lambda admin manage * Gateways, load balancers, firewalls… not represented here for the sake of simplicity Sync call* invokes PUB/ SUB Async call*

Slide 29

Slide 29 text

4.Execution stack

Slide 30

Slide 30 text

Lambda server Context Your function goes here Lambda pod Kubernetes/OCP Init-container: Bootstrapper Logging, tracing, monitoring POST .../functions/[id]:call Caller Manager Control plane

Slide 31

Slide 31 text

Execution stack ❏ Add a new language implies to build a new lambda server implementing the internal json rpc protocol for that language and the setup process ❏ Add the internal pipelines needed to ensure software quality and vulnerabilities checking

Slide 32

Slide 32 text

DEMO TIME

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Thanks! github.com/landistas @hector_rodes @agonzalezro