►
From YouTube: Custom Plugin Development with Kong Gateway
Description
Kong plugins are the real muscle behind the Kong ecosystem, giving you the power to implement API gateway policies in a plug and play fashion.
In this session, we will deep dive into the Kong plugin architecture, basics around plugin development, testing, and automated delivery. You will have the opportunity to learn about different plugin phases during an API request, unit testing, and installation of a plugin in Kong Gateway.
We’ll show a live demo on how to develop a custom plugin in Lua and deploy it to Kong Gateway.
A
Hello,
everyone
good
morning,
good
afternoon,
good
evening
from
wherever
you're
joining
us.
My
name
is
Dalia
I
work
as
a
global
Community
manager
here
at
Kong
and
I'm
so
happy
to
welcome
all
of
you
here
for
our
April
user
call.
The
topic
for
today
is
custom
plugin
development
with
con
Gateway.
We
have
lokesh
here
with
us.
He
will
introduce
himself.
A
B
Thanks
Dalia,
hello,
hello,
everyone,
so
my
name
is
lokesh
I'm,
a
senior
engineer
at
Kong,
I,
primarily
work
in
the
customer
customer
experience.
Team
I
also
work
as
a
solution
architect
in
Timor
Enterprise
and
strategy
customers,
primarily
on
the
UK
Financial
Services
domain,
and
also
I
help
engineering
team
to
develop
plugins
as
well,
and
that's
why
I'm
here?
B
Okay,
so
let's
get
started.
Let
me
go
to
the
agenda
first,
so
I
know
we
have
a
packed
agenda,
so
I'll
try
to
cover
as
much
as
smoothly
there's
a
lot
of
technical
details
around
it
and
there
would
be
a
demo
at
the
end
as
well.
So
we
will.
We
will
touch
base
initially
with
the
with
some,
like
you
know,
high
level
understanding
around
cone.
Plugins
also
know
you
know
some
know-how
around.
You
know
why
we
need
plug-in
what
it
is.
B
How
does
it
integrate
with
the
con
Gateway
big,
deep
dive
into
how
con
Gateway
on
the
runtime
integrate
with
plugins
touch
base
on
the
development
tools?
You
know
we
we
work
with
a
lot
of
Engineers
and
we
build
some
in-house
tooling
as
well.
So
that's
something
to
help
some
installations
around.
How
we
install
the
you
know,
custom
plugin
onto
the
con
Gateway
and
this
another
one
is
much
debated
topic
around.
B
You
know
having
a
plug-in
in
different
programming
like
ways,
so
we
will,
you
know,
have
we'll
touch
with
that
area
as
well.
At
the
end,
we
will
wrap
up
around
the
demo
and
and
some
best
practices
around
point
of
view
from
the
field
side.
B
Okay.
So
let's
move
on
introduction.
So
before
we
go
to
the
introductions,
Let's
take
a
step
back
and
understand
the
runtime.
You
know
so
understand
the
overall.
What
Cong
it
is
so
that
gives
us.
You
know
when
the
plugin
is
running
running
on
what
foundations
so
to
start
with
Congress
and
applications,
which
is
primarily
written
in
Lua
and
that's
in
on
top
of
open
Rusty
framework
and
Returns
on
the
nginx
web
servers.
That's
primarily,
you
know
in
a
nutshell,
the
text
deck
behind
the
com.
B
Going
next
I'll
give
a
brief
introductions
around
the
com,
modular
architectures
again
why
it
is
important
it
is
to
understand
where
the
plugin
fits
and
what
it
is
life
cycle.
So
so
yeah
as
I
said,
the
core
motherships
for
the
Kong
is
nginx
and
open
resty.
B
In
fact,
the
Kong
is
a
primary.
You
know
major
contributor
for
the
open
rst
and
that
these
two
technology
is
based
the
foundations
for
the
Kong.
All
the
under
underlying
architectures
inside
on
these
two
technologies,
openresti
provides
the
nice.
You
know
why
we
use
open
rest,
because
this
provides
a
nice
hooks
around
the
response
and
request
life
cycle,
and
this
is
where
the
complex
comes
into
the
picture.
B
We
do
have
the
con
clustering
and
data
source.
This
is
around
the
config
management
and
you
know
around
the
caching,
of
course
plugins.
We
will
talk
more
lot
more
around
these
areas,
but
you
know
primarily,
you
can
write
into
many
languages.
B
The
core
use
case
around
the
plugin
is
to
you
know,
intercept
your
you
know,
API
request
and
back-end
API
response
as
well,
some
and
at
times
customer
use
to
integrate
with
the
third
party
and
on
the
top
we
have
the
administrator
control
plane
right
in
our
controller,
where
you
can
configure
the
plugin
configure
the
service
and
routes
on
various
means.
B
Okay,
so
let's
zoom
in
around
the
custom
plugin,
you
know
why
we
need
and
what
it
is
and
how
Kong
supports
you
know
at
the
runtime
to
to
execute
the
custom
plugin.
B
So
this
is
what
you
know.
I
work
with
a
lot
of
customers
and
one
of
the
key
question
customer
ask:
is
you
know
what
are
the
you
know
primary
reason
around
the
using
the
custom
plugin?
So
the
common
use
case
we
saw
around
the
custom
plugin
is
to
you
know.
Whenever
you
file,
you
find
a
scenario
which
is
are
out
of
the
plug
out
of
the
box.
Plugin
doesn't
support
it.
Then
you
go
and
implement
the
custom
plugin.
There
are
areas
where
we
don't
ask
the
customer
to
go
wild.
B
You
know,
just
you
know,
don't
Implement
your
integration
pattern
into
the
custom
plugin,
but
rather
you
know
keep
it
where,
like
within,
within
the
API
Gateway,
no
main
culture.
Sometimes
customers
also
have
their
in-house
third-party
system
where
they
wanted
to
implement
this
custom
plugin.
So
that's
quite
cool
with
one
of
the
things
I
I'll
highlight
here
is
the
all
our
all
our
con
plugins
is
is
present
in
the
Kong
image,
and
this
is
how
the
custom
plugin
would
be
will
be
also
installable
and
we'll
come
to
that
point.
B
But
we
have
a
lot
of
plugins
in
those
area
around
the
authentication,
Securities
traffic
control.
You
know
around
the
analytics
as
well
and
you
can
find
all
these
details
into
our
Kong
hub,
because
you
know
the
on
every
new
Cycles
there
are
new
plugins
coming
in.
Sometimes
the
community
also,
you
know,
participate
to
create
new
plugins
and
that's
updated
on
the
on
our
hub.
B
How
did
how
it
works,
so
Chrome
provides
pretty
flexible
architecture
around
the
extensibility,
as
I
showed
you
in
the
previous
slide
having
the
open
wristy.
It's
very
easy
to
hook
up
the
hookup
between
the
different
nginx
modules.
B
So
that's
where
the
whole
the
plug-in
ecosystem
fits
in
and
even
like
you
know,
90
percent
of
our
API
Gateway
policy
is
work
on
the
plugin
itself.
So
plugins
are
are
the
real
muscles
we
are
in
the
con
Gateway
plugins.
Also
also,
you
know
if
you
write
the
plugins
into
into
Lua,
it's
run
in
process
with
con
Gateway
and
I.
Think
from
the
deployment
perspective
is
easy
to
deploy
it
and
since
it's
run
in
process,
they
are
highly
performance.
B
You
know
there
is
no
like
external
process
running
when
you
write
the
plugin,
so
it's
a
quite
tightly
Integrations
within
the
com
Gateway,
given
its
modular
architectures,
so
that
you
can
hook
up
the
custom
plugin
very
easily
the
the
the
life
cycle
of
the
plugins.
You
know
which
you
can
call
as
a
scope
can
be
to
to
a
different
Kong
entity,
I'm
not
going
into
detail
around
what
is
consumer
routes
and
services
I'm
consuming
I?
B
Would
you
would
have
some
knowledge
around
it,
but
these
are
like
a
primary
actor
or
primary
configurations
details
around
the
Gateway
around
it,
and
then
you
can
scope
it
down
to
plug
into
any
level
which
is
globally
or
particular
consumer
or
particular
route
or
service,
and
then
the
plug
plugin
will
execute
during
that
point
of
time.
B
What
plugin
can
do
again,
if
you
think
from
the
API
management
perspective,
all
the
API
policies
which
which
you
need
from
based
on
your
requirement?
It
is
the
count
plugin
who
would
be
would
be
doing
that
you
know
which
is
in
in
an
area
of
authentications
or
security
or
traffic
control.
Transformations
is,
you
know
heavily
used
in
the
plugin
and
somewhere
in
the
logging
and
analytics
when
you
wanted
to
integrate
with
your
in-house
monitoring
system.
B
Right
so,
if,
if
that's
that's,
given
the
overall
idea
around
the
how
and
what
plugin
can
do,
if
you
zoom
in
a
bit
that
what
exactly
you
know
the
plugin,
how
exactly
plug-in
is
hooked
up
within
the
runtime?
B
So
for
that,
let's
understand
a
bit
around
the
around
the
nginx,
because
that's
a
very
key
Technologies
where
which
Cong
is
based
on
and
then
we
will
we'll
go
to
that,
how
the
how
the
different
phases
are
tied
up
with
those
different
nginx
modules.
B
So,
as
you
can
see
here,
these
are
the
the
nginx
okay,
you
know
open
resty
modules,
so
a
bit
technical
from
our
side,
but
then
Kong
will
provide
the
very
abstract
level
on
top
of
it.
So
what
it
does
is
these
all
are
phase
phases.
You
know
encapsulate
within
the
request
phase
and
then
the
content
pylor
is
primarily,
you
know,
come
under
the
response
phase
and
then
there
is
a
third
phase,
which
is
a
log
page.
B
So
this
is
how
the
you
know
when,
when
we,
when
we
want
to
write
a
plugin,
we
need
to
understand
that
which
particular
nginx
model
or
directive
we
need
to
apply
for
the
request
and
we
need
to
you
know,
have
that
mind
for
the
response
as
well
foreign,
something
to
note
about
it
and
that's
again,
I've
seen
the
customer.
They
made
mistakes
around.
You
know
which
particular
you
know.
The
nginx
model
directory
is
works
at
the
application
Level
and
what
are
the
rest
of
the
directives?
What
what
at
the
request
level?
B
The
reason
being
that
you
know,
because
anything
you
wanted
to
do
at
the
bootstrap
right.
So,
for
example,
if
you
wanted
to
initialize
a
plugin
with
you
know
loading
some
environment
very
well
or
updating
your
cache.
Ideally
you
should
we.
We
should
do
it
at
the
application,
Level
and,
of
course,
the
request
level
is,
you
know,
being
executed
on
each
and
every
request.
B
So
so
that's
that's.
That's
really
use
case
around.
You
know
loading
the
environment
variable
or
cachings
during
the
application
bootstrap,
because
you
don't
want
to
you
know,
load
every
time.
Your
request
and
response
comes
because
there
is
no
use
around
it
and
it
also
create
the
performance
overhead.
B
So
going
for
that,
if
we
actually
mapped
out
to
this
different
directives
to
the
actual,
you
know
the
plug-in
methods
which
provided
by
Kong
pdk
than
what
it
looks
like
the
all
the
initializations
directives,
which
is
primarily
you
know,
create
hooked
up
in
the
init
worker,
so
anything
to
do
with
the
initializations,
which
is
just
you
know,
once
in
a
life
cycle
when
Kong
data
plane
bootstrap
it
it
just.
You
know,
execute
the
innate
worker.
B
Anything
with
respect
to
the
your
client
request.
You
know
you
want
to
read
some
header
or
you
want
to
change
a
header
before
the
request
go
to
the
Upstream.
These
are
the
phases
you
will
be
you'll
be
dealing
with
the
the
one
of
the
main
you
know
most
frequently
used.
B
B
So
before
once
we
call
once
your
backend
API
in
Chrome
world,
we
call
this
Upstream
so
once
once
you're
Upstream
return,
the
responses
again,
you
know
come
to
the
com
and
you
wanted
to
you
know,
do
something
into
it
like
you
know,
enrich
the
response
or
add
some
identify
or
add
some
correlation,
ID
Etc,
then
that's
something
you
you
would
be
doing
with
primarily
in
these
two
method,
as
name
suggested
header
filter,
is,
is
deals
with
the
header
only
and
the
body
filter
body
filter
can
deal
with
the
header
and
body
as
well.
B
So
if
in
Kong,
what
we
do
is
we
We
crave
around
the
performance,
so
anything
to
do
with
the
header
con
will
not
open
up
the
body,
so
it's
very
lightweight
operations.
It
just
you
know,
change
some
header
here
and
there
and
send
it
back
to
your
API
client.
So
if
you
know
that
you
are,
you
only
need
to
do
any.
You
know
change
something
into
header.
B
I
recommend
to
just
use
the
header
filter
rather
than
going
into
body,
because
you
know
reading
the
body
is
again,
you
are
opening
up
the
entire
HTTP
request
body,
sorry,
responsibility
and
then
the
this
one
around
the
logging
quite
handy
is
when
you
want
to
log
something
into
it.
You
know,
for
example,
getting
some
IDs
from
the
HTTP
adder,
and
you
want
to
log
inside
your
blog
file
the
the
good
thing
about
this
logging
phase.
Is
it
it
execute
when
the
last
response
byte
sent
to
your
API
client?
B
B
Right
so
all
about
when
we
write
the
plugin
and
when
we
have
a
requirement,
we
we
can
just
you
know,
map
it
out
that
which
method
or
which
phase
I
need
to
write
my
custom
logic.
B
Now
when
it
comes
to
the
the
plugin
you
know
when
we
develop
the
plugin,
there
is
a
certain
structure
which
we
follow.
You
know
ask
you
to
follow
around
it
and
then
it's
it's
pretty
simple
right.
You
have
a
handler.lua
which
is
your
core
module
where
all
your
business
logic
goes
in.
So
all
your
methods
would
be
implemented
into
the
handler.lua
which
we
saw
in
the
previous
slide.
It's
a
mandatory
file,
so
you
can't
have
a
plugin
code
without
android.lower
I
doubt
you
need
a
plugin.
B
If
you
don't
have
a
Handler
and
then
another
important
file
is
around
skill.
So
the
schema
is
very
important
where,
if
you
think
from
the
product
perspective,
we
make
the
plugin
like
quite
generic,
quite
configurable,
quite
flexible,
so
that's
applied
to
custom
plugin
as
well.
So
when
you
create
a
custom
plugin
make
sure
that
you
know
it's
a
configuration
driven.
You
know
you
can
add
as
much
as
flexibility
as
you
can
so
that
can
meet
you
a
feature
requirement.
B
The
next
three
files,
which
is
you
know,
data
access,
object,
Lua,
module,
your
API
modulate
migrations,
so
the
they
are
pretty
much.
You
know
non-mended
free
because
that's
based
on
use
case
to
use
case.
So,
for
example,
if
you
need
anything
to
do
with
your
database,
then
you
would
need
you
know,
and
you
are
looking
to
create
some
custom
entities
and
custom
table
into
Kong.
B
Then
you
would
need
these
data
access,
object,
Lua
and
then,
of
course,
you
need
to
provide
the
migration
file
so
that
you
know
when
concrete
those
tables,
it
knows
what
tables
to
create
and
then
the
api.luwise
you
wanted
to
create
an
end
port
right
endpoint
within
within
your
platform
right,
not
your
endpoint
of
your
actual
business
API,
but
you
know
some
certain
endpoint
you
wanted
to
have
from
the
platform
perspective.
Then
that's
where
you
will
implement
the
api.lua,
so
it
can
create
those
endpoint.
B
Okay,
so
now,
let's
talk
about
the
tooling,
because
once
you
know
where
my
business
logic
goes,
you
figure
it
out
and
you
build
the
plugin
I
mean
you
figure
it
out.
Okay,
this
is
my
structure
of
the
plugin.
Is
you
would
be
looking
around
the
tooling
right?
What
sort
of
tooling
I
need
to
adopt
so
that
you
know
that
makes
my
life
more
easy,
pretty
simple
weak
from
the
Kong?
B
We
don't
have
any
reservations
around
the
ID,
because
you
know
it's
a
developer
choice,
but
one
of
the
tools
we
created
in-house,
which
is
which
helps
a
lot
around
the
testing
of
their
plugin.
So
it's
it's
Pro.
It's
called
Pongo,
it's
a
container
based
it's
a
Docker
based.
It
provides
you
the
integrated
environment
around
the
Kong.
So
you
actually
see
the
request
is
coming
to
your.
You
know
the
the
Run
running
cone
and
then
the
response
is
going
back.
So
it's
providing
you
fully
integrated
environment.
B
It's
full
of
the
unit
test.
You
can
write
the
unit
test
of
the
company.
Pongo
can
execute
the
unit
test.
It
also
provide
the
other
features.
Like
you
know,
your
linting,
where
it
keep
going,
excuse
me,
go
and
check
your
syntax,
validations,
Etc
and
also
it
helps
you
to
package
your
plugin
into
rock
file.
We
will
come
to
the
come
to
in
a
bit
later
in
the
installation
steps,
but
that's
this
tool
also
help
you
to
you
know
package
the
artifact
out
of
out
of
your
custom
plugin
it's
publicly
available.
B
So
if
you
search
Congo
on
Google,
you'll
find
a
link
and
you
can
start
playing
around,
there
is
another
one
which
we
have
created,
and
this
is
something
we
learned
from
our
wider
audience
around
to
create
a
you
know,
a
plug-in
template
which
will
give
you,
like
you,
know,
a
Kickstart,
it's
a
scaffold
project
so
which
is
which
is
already
there
evf
like
initial
file
structure,
initial
integration
test,
so
you
are
ready
from
the
day
one
and
then
you
all
you
just
need
to
do.
B
Is
you
know
flush
out
your
your
business
logic
into
it
again,
it's
available
publicly,
so
you
can
go
and
use
the
template.
In
fact,
we
will
use
this
in
our
demo,
so
you
will
see
in
the
in
the
action.
B
Your
local
development
for
Lua,
which
is
pretty
much
you
know
we,
we
build
the
plugin
in
lower
itself,
so
there
is
no
like
a
interactive
debugger
available
because
you
know
Lua
works
as
extension
of
your
existing
language,
so
yeah
you
have
to
live
with
it.
B
You
can
also
install
Kong
locally,
because
you
know
you
can
install
with
luajit
and
lower
Ox.
There
are
instruction
available
on
our
Kong
git,
so
you
can
find
and
do
that.
B
Of
course
you
need
to
update
few
parts
around
your
embedded,
luajita
lower
Ox.
We
don't
ask
you
to
install
this
lower
jet
separately,
but
it
just
comes
with
the
com
in
in
its
artifact
itself
around
your
IDE.
It's
your
choice!
There
is
no
like
settings
down
around
that.
How
do
you
want
to
use
your
IDE
but
pretty
much
our
engineer
and
we
use
the
visual
studio
code,
but
it's
up
to
the
developer,
what
they
wanted
to
do.
B
There
are
a
few
vs
code,
extensions
that
you
can
use
it
as
I
provide
the
link
you
know
here
which
which
can
help
a
lot
when
you,
when
you
write
a
code
in
the
Lua.
B
Okay
installation,
so
if
you
see
Kong
content
deployed
into
many
ways
right,
you
can
deploy
Kong
in
as
in
as,
like
you
know,
in
a
bare
metal
in
your
VM,
then
you
can
just
if,
if
that
is
installed,
then
you
just
pick
the
plugin
file
as
a
rope
file,
because
this
is
how,
within
the
Lua,
you
know,
lower
Ox
works.
So
you
just
you
know,
package
into
the
into
the
Rock
file
and
use
the
lower
rocks
to
install
that
plugin
into
your
operating
system.
B
If
you
use
the
container
base,
for
example
Docker,
then
in
that
case
you
just
Mount
the
plugin
files
into
your
Docker
volume
and
just
configure
the
plugin
into
your
into
your
Docker
file
or
create
the
create
the
Custom
Image
and
just
deploy
it,
and
if
we
deploy
it
as
in
kubernetes,
then
you
know
the
the
easiest
win,
which
is
my
favorite
one
is
you
can
just
create
the
kubernetes,
config
or
secrets
and
change
your
hand
chart,
and
it
just
works
like
a
job
for
our
customer.
B
Primarily,
we
recommend
as
a
best
practice,
to
create
the
Custom
Image.
The
reason
is
that,
because
you
know
you
know,
when
you
have
a
when
you
have
a
real-time
scenario,
you
know
when
you
have
a
a
specific,
like
you
know,
customer
a
business
problem.
Then
you
know
your
your.
Your
plugin
would
be
a
bigger
right.
You
need
to
have
Version
Control
Etc.
B
So
that's
where
the
building
the
custom
customer
image
can
easily
go
with
your
image
version
with
your
plugin
version,
so
you
can
easily
manage
that
one
and
it
also
go
with
the
given.
You
know
your
container
concept
around
that
you
know
everything
should
be
packed
inside
your
inside
your
container.
You
should
not
have
your
exit,
you
know
the
runtime
or
executable
outside
of
your
container.
So
that's
why
you
know
we
usually
recommend
customer
to
create
the
custom
image
for
for
Docker
or
kubernetes
based
deployment.
B
Okay,
so
going
next
again,
a
lot
of
customers
ask
around
it.
Okay,
we
have
many
plugins
and
we
wanted
to.
You
know
hook
that
up
into
our
CI
CD
pipeline.
Have
this
a
very
simple
point
of
view
around
that
when
you
have
a
custom
plugin,
how
you
can
you
know
continuously
deliver
or
continuously
update.
You
know
if
something
has
changed,
because
I
work
with
a
customer
where
we
build
like
sort
of
almost
like
20
different
plugins,
then
you
need
to
think
about
the
automations
right.
B
In
that
case,
it
works
pretty
simple,
nothing
new!
From
the
development
perspective.
You
have
a
PR
if
you're
done,
merge,
Parada
and
then
you
use
the
Pongo
and
just
have
the
few
command
for
the
phone
go
around
the
linting
around
your
test.
Executions,
then,
at
the
end
you
build
the
artifact,
which
is,
you
know,
build
your
like.
You
know
your
rope
file
Etc
and
then
you
just
upload
your
artifact
somewhere.
B
You
know
as
an
whatever
you
know,
artifactory
or
whatever
choice
of
the
Tool
you
have
within
the
organization,
then,
while
delivering
it,
you
just
get
the
artifact,
build
the
golden
image
and
just
deploy
the
golden
image.
You
know
by
kubernetes
or
Docker.
Whatever
means
you
are
deploying
it.
B
Thank
you
right.
This
is
another.
You
know
much
debated
topic
around
the
custom
plugin
in
other
language.
So
so
far
what
I've
described
is
the
is
the
one
we
most
of
the
plugins
we
developed
into
Lua,
and
that's
how
you
know
you
package
it
up
and
you
install
and
deploy
into
the
lower
but
having
having
said
that
Kong
as
a
company
also
provide
other
means
of
you
know
other
programming,
language.
B
You
can
use
to
to
create
the
custom
plugin
and
for
now
that
there
are
primarily
three
different
language
supported
python,
go
and
JavaScript,
where
you
would
need
an
external
process
running
at
the
same
times
which
we
can
execute
your
go
and
python
plugins,
and
then
you
you
provide
a
hook
into
into
the
account.
B
Also
in
our
last
Summit
we
there
is
a
tech
preview
coming
it
for
Visa
Max.
It's
a
very
his
feature
will
be
coming
coming
up
soon.
We
still
need
to
decide
from
the
product
perspective
is
when,
but
that
will
open
up
for
more
area
around.
You
know
providing,
for
example,
rust
or
any
other
languages.
Even
if
you
want
to
write
in
Java,
you
can
write
in
Java
and
you
can
provide
this
resumex
client.
B
Yes,
so
the
this
is
when
the
the
more
contentions
comes
around
like
why?
Why
Lua?
And
why
not
the
other
language,
the
reason
when
it
comes
for
the
Kong
plugin
itself,
because
we're
talking
about
the
you
know
from
the
con
plug-in
perspective?
B
What
we
learned
is
about
is
you
know
it's
not
about
learning
the
technology,
but
it's
about
learning
the
or
learning
the
platform
you
know,
learning
account
learning
how
open
resty,
Works
learning,
how
the
request
phases
and
response
phases
works
so
like
most
of
the
learning
curve
is
around
around
that
ecosystems
and
then
also,
you
know,
learning
the
tools
right
now
how
Congo
Works,
how
my
unique
unit
test
case,
I,
write,
Etc
and
then
it's
only
only
20
of
you
know,
learning
the
language.
B
So
that's
why
we
say
you
know
we
just
you
need
to
balance
it
out
when
you,
when
you
make
a
choice
of
the
language.
There
are
other
advantages
of
the
being
right
in
the
Lua.
Is
it
has
a
native
support,
as
I
said,
then,
since
Kong
is
built
in
Lua,
it
provides
the
in
process
runtime
for
for
the
Lua.
So
what
that
means
is
it's
very
well
performant,
because
there
is
no
like
a
different
process
is
running
again
very
well
tested.
B
There
is
a
solid,
tooling
supports
around
it,
and
also
Lua
has
a
smaller
and
very
compact
ecosystem.
So
you,
you
will
I
mean
sometimes
it's
hard
to
find
the
compatible
driver
but
think
about
it.
We
build
the
wrong
in
and
Thai
Lua,
so
I,
don't
think
so.
You
will
you'll
end
up
with
the
situations
where
you
you
are
not
having
anything
in
the
lower
From
perspective
they
go
and
the
other
language
you
would
need
to
run
the
external
process.
B
Of
course
there
is
a
larger
Library
sets
is
available
when
it
comes
to
transformation,
and
this
is
where
they
do
are
slightly
like
flag
is
around.
You
know
if
you
wanted
to
read
some
XML
and
create
the
xmatitations
which
again
I
doubt
why
you
need
to
do
in
API
Gateway.
But
but
if
you
have
certain
like
complex
business
logic
and
we
need
a
complex
library,
then
you
know
you
have
a
more
a
more
larger
set
and
available
into
other
languages
than
Lua
from
com
perspective
or
tooling
or
evolving.
B
We
we
are
working
actively
onto
it
to
support
a
customer
who
wants
to
write
the
the
custom
plugin
to
different
language.
B
B
Okay
so
right,
demo
time
what
I'll
do
is
I'll
quickly
run
I
mean
a
short
demo
around.
You
know
when
you
want
to
write
a
custom
plugin.
What's
the
first
step
you
need
to
do
and
how
to
deploy
into
my
kubernetes
environment.
So
wish
me
luck
all
right.
Let's
do
it.
B
As
I,
you
know
show
you
on
the
previous
slide,
that
this
is
the
template.
We
have
so
I'm
using
the
same
template
and
what
I'll
do
is
I'll
just
create
a
new
repository
for
this
template
and
I.
Just
say
this.
My
hello
world,
plugin.
B
And
I
can
just
straight
away,
create
the
create
the
plugin
from
this
Repository
and
it
gives
you
everything
right.
You
know
your
the
structure
you
need
and
and
it's
integration
test
and
everything.
B
B
B
Right
so,
as
you
can
see,
we
have
handler.lua
here
which
gives
you
all
the
hooks
like
init
worker.
We
describe
that
it
says
header,
filter
Etc,
so
what
I'm
doing
in
this
plugin
is
basically
setting
up
two
header.
One
is
setting
the
header
into
the
request,
which
is
will
be
visible
to
your
Upstream
and
also
on
the
way
back
I'm
setting
up
the
header
into
response,
which
is
you
know,
go
back
to
your
API
client,
pretty
straightforward.
But
what
what
this
you
know
this
file
does
is
give
you
like.
B
You
know
Kickstarter
on
what
you
need
to
do
in
each
and
every
method
also
gives
it
a
you
know
the
schema.lua,
if
you
see
here,
I'm,
just
providing
the
the
name
of
the
header
so,
like
you
know
hello,
world
Bible.
So
that
gives
you
like
an
idea
around
that
you
know
how
the
configurations
can
be
useful,
because
if
you
have
requirement
that
okay
I
want
a
header
name
to
be
different,
then
you
can
go
and
change
the
change.
The
schema
file,
I'm,
not
changing
anything
into
it.
B
I
will
straight
away,
go
and
deployed
it
before
that
I
will
Run
free,
Pongo
command,
make
sure
I
have
Congo
and
I
would
say.
B
Just
to
demonstrate
that
you
know
it
just
do
the
linting
of
of
all
your
the
handle
files
schema
file,
as
well
as
your
the
the
the
test
cases,
so
it
as
everything
works.
B
B
B
B
Go
and
show
you
what's
my
mainly
around
the
integration
test,
look
like
where
it
basically
just
says,
for
example,
on
the
request:
I
just
go
and
check
there
is
a.
There
is
a
header
which
is
the
value
of
this
Zone
request,
and
there
is
a
header
which
is
for
the
response.
That
is
a
header
which
value
on
this
response,
and
this
this
guy
the
Pongo,
provides
dummy
routes
and
the
host,
where
you
can
just
say,
Okay
against
this
route
and
service
just
execute
my
plugin.
B
You
know
test
cases,
pretty
handy
you
can.
You
know
it
gives
you
a
very
fail
fast
opportunity
to
just
if
anything
goes
wrong.
If
you
have
a
good
coverage
into
Integrations,
you
can
catch
that
in
early
stages,
right,
Okay,
so
now
I
know
in
I
know
I've
created
the
plugin
did
did
my
you
know
run
my
test
case.
I've
validated
its
all
work
file,
I'm
gonna,
go
and
deploy
it
into
Kong,
because
this
is
where
you
know
your
plugin
will
actually
execute.
B
You
know
comes
into
action
right
now:
I'm
I'm
running
my
Kong
into
a
kubernetes
environment,
so
I
will
just
use
I'll
just
create
the
config
map
to
to
Mark
to
to
have
all
these
plugins
into
a
config
map
and
then
provide
some
configurations
into
my
hand
chart
so
that
you
can
start
executing
into
it.
B
Oh
okay,
already
here
so
I
will
and
for
that
I
need
to
go
into
the
actual
directory
so
which
is
Kong,
plugins
and
so
I
have
my
plugin
here
and
then
the
the
two
files,
because
this
is
the
two
important
file
which
we
need
into
the
config
map,
so
I
just
say:
Okay
create
config
map
just
to
make
sure
that
I
have.
A
B
Right
and
I'm,
creating
the
config
map
of
my
header
and
from
the
file,
which
is
the
director
of
the
my.
B
C
B
Oh,
it's
already
exists.
Sorry,
it's
there
in
my
instead
in
my
communities
already,
so
what
I'll
do
is
you
know
doing
that.
C
B
Okay
and
for
that
reason,
I
also
had
just
created
a
hand
chart
so
I
just
wanted
to
show
you
that
what
what
is
that
you
want
to
do
because
now
you
created
the
config
map
which
is
present
in
your
kubernetes,
but
at
the
same
times
you
need
to
instruct
into
the
Kong.
So
it
can,
you
know,
load
into
into
the
conflict.
So
when
it
comes
to
the
comes
to
configurations,
you
can
easily
configure
against
the
service
in
route.
B
So
in
order
to
configure
within
the
com
you
just
need
to
make
few
entries
into
the
hand.
Chart
I
will
just
create
a
folder
here.
So
let
me
go
into
here
and
see
the.
B
It's
it's
very,
very
easy
way.
All
you
just
need
to
do
is
just
add
this
plugin
and
then
you
know,
and
then
all
the
configments
for
the
plugins
you
have
into
it.
So
if
you
have
multiple
plugins,
it's
an
array,
so
you
can
create
that
yeah.
This
is
it
and
then
we
just
go
and
deploy
this
I'm.
Sorry.
B
Yeah
it's
running
and
I
quickly
go
and
if
I
show
you
here.
B
And
let
me
just.
B
B
Oh,
it's!
Oh
it's
already
existing
I,
guess
I
guess
I
was
creating
it
before
so
the
plugins
already
exist
on
this
on
this
endpoint.
B
So
if,
if
you
see
the
point
around
it,
the
configuring,
the
plugin,
if
you
use
the
kubernetes,
it's
pretty
straightforward.
If
you
go
into
the
going
to
the
helm,
chart
and
and
update
this
particular
you
know
particular
plugin
and
the
config
Maps,
that's
it
for
your
Docker
or
for
your
VM
based
you
can
you
can
deploy
the
plugin
into
a
into
a
different
way?
One
way
is
to
just
you
know,
Mount,
that
plugin
into
your
container
and
just
create
the
create
the
Custom
Image.
B
All
right
so
going
back
to
the
going
back
to
my
presentations
around
it.
The
the
last
picture
I
wanted
to
cover
is
around
the
best.
You
know
what
are
the
best
practices
around
it,
because
a
certain
time
the
the
customer
asked
and
even
the
developer
asked
you
know
anything
I
need
to
know
in
order
to
in
order
to
know
like
what
good
a
plugin
look
like.
B
So
there
are
a
few
general
rules
around
it
say
if,
if
your
script,
which
is
a
Lua
file,
the
handler.l
is
becoming
a
too
big
you
can.
You
can
just
you
know,
separate
it
out
into
different
modules,
and
then
you
can
refer
into
a
individual
file.
B
The
another
good
Good
Housekeeping
rules
is
make
sure
your
plugin
is,
you
know,
mainly
configuration
driven
so
that
you
know
when
it
comes
to
more
flexibility
or
you
wanted
to
apply
a
different
configurations
based
on
the
different
needs.
Then
then
you
don't
need
to
go
and
change
the
code,
but
rather
you
just
you
know,
configure
the
plugin
accordingly,
if
you
see
our
oidc
plugin,
it
has
almost
like
100
sort
of
different
configurations.
B
Sometimes
it
goes
out
of
the
hand,
but
if
you
manage
this
nicely,
you
know,
like
you
know,
put
into
a
different
component,
then
it's
it
works
out
very
well,
the
the
another
way
you
know
the
common
ask
we
get
is
say,
for
example,
if
I,
if
I
wanted
to
have
like
you
know
the
new
feature:
I
won't
have
changing
the
plugin
and
I
wanted
to
run
side
by
side,
and
what
we
say
is
you
know
just
rename
your
new
plugin
so
that
they
can
coexist
together.
B
If
you
have
the
plugin
with
the
same
name,
then
then
they
will
they
will
they
will
clash
with
each
other.
B
The
the
another
one
is
to
make
sure
that
you
rename
the
database
table
and
cache
keys
so
that
you,
you
prevent
the
collisions
around
the
around
the
testing
as
much
as
your
integration
test,
so
that
you
know
you
can
cover
all
your
edge
cases
and
any
issues
before
and
before
deploying
into
into
your
Productions,
and
for
that
you
know,
Pongo
is
promo.
Can
help
you
a
lot.
B
B
There
are
a
few
things
to
know
around
performance,
for
example,
if
you
need
something
to
share
between
your
different
phases.
For
example,
you
need
some
sort
of
ID,
which
is
come
as
a
part
of
request
phase,
but
you
need
that
ID
to
be.
B
You
know
if
you're
Upstream
is
not
sending
back,
but
if
you
need
that
ID
to
be
send
that
information
to
send
back
to
your
API
client,
then
you
can
just
create
a
plugin
context,
and
then
you
can
share
that
object
between
different
phases
avoid
the
logs,
because
if
you
have
multiple
workers
requests
coming
in
then
it's
it.
It
gets
very,
very
easily
where
you
want
to
do.
B
You
know,
update
something
around
it,
and
that
happens
primarily
when
you,
when
you
build
a
plugin
which
is
deal
with
your
database
and
caching
and
Etc
use
com
cache
as
much
as
you
can
when
you
deal
with
database.
So
that
you
know
you
don't
need
to
go
and
read
the
database
every
time
and
just
Leverage
The
radish
as
a
share
cache,
because
we
have
our
predicate
provide.
You
know
a
lot
of
those
functions
where
you
can
just
go
and
talk
to
the
radish.
B
B
Right
cool,
that's
the
end
of
my
presentations
and
we
can
have
a
q
a
now
for
any
questions
you
have
so
far.
B
Right
so
I'll
I'll
read
out
first
I
I'll
read
out
Max
questions,
yeah
I
think
the
the
Lua
against
the
question
for
Max
is
around.
The
Lua
is
preferred
language
for
writing
plugins
and
what
is
the
performance
overhead
if
you
choose
the
plugins
in
the
different
language?
B
B
They
run
in
separate
process.
So
there
would
be
like
you
know
your
when
it
does
the
runtime
executions.
You
just
need
to
rely
on
that
that
you
know
plugin
servers
to
give
the
detail
around
it.
So
there
is
a
I
can't
come
into
the
number,
because
it's
based
on
how
big
your
plug,
you
need
what
what
sort
of
business
logic
it.
But
there
is
a
sort
of
a
latency
you
will
introduce
to
any
when
you
don't
use
the
one.
B
I
hope
that
answer
your
question
Max,
the
the
next
question
from
John
is:
where
does
this
log
write
to
you?
So
the
log
writes
to
the
to
the
con
log
file.
So
concrete
is
the
you
know
nginx
logs,
so
you
can
actually
go
and
write
into
it.
In
fact,
not
just
that
within
the
log
you
can
just
you
know,
write
into
your
Monitoring
Solutions,
for
example,
into
your
Kafka
or
some
other
monitoring
you
can
easily
do
that.
B
I,
don't
know
who
is
this
question
from,
but
this
is
around
the
performance
testing
on
a
plugin
the
the
way
to
see
the
performance
testing
of
the
plugin
which
it
which
is
rep
around
how
you
do
a
performance
testing
of
of
on
your
API
with
the
latest
Kong
release
is
give
you
the
you
know,
start
time
and
end
time
of
the
con
plugin.
So
your
custom
plugin.
B
B
It's
a
very
good
question:
John:
where
can
I
control
the
version
of
the
Kong
while
running
the
test?
The
the
version
of
The
Cone
can
be
controlled.
One
is
in
your
Helm
chart,
but
one
of
the
good
practices
around
your
version
of
the
com,
because,
if,
if
that's
why
we
recommend
customer
to
adapt
the
cold
and
image
the
Custom
Image,
so
you
can
version
your
you
know:
Kong
image
according
to
your
plugin
versions.
So
that's
works
very
well.
B
Any
real
world
numbers
to
show
the
performance
overhead
between
go
plugin
and
do
a
plugin.
It's
very
tricky
to
comment
on
this
one
because
you
know
we
are
talking
about
the
custom
plugin
right
and
the
custom.
Plugins
has
your
business
logic
so
to
put
in
a
perspective,
say
if
you
are
doing
some
sort
of
like
a
Transformations
like
you
know,
you're
opening
up
the
request
story
and
doing
some
sort
of
a
business
logic
into
the
Transformations.
B
Then
it
it's
very
hard
to
compare
how
much
the
Lua
will
give
you
and
as
it
tends
to
go
but
sir
one
one
thing
for
the
show
that
go
Plugin
or
any
other
plugin
will
add
up.
Over
and
above
what
Lua
ends.
B
Ups,
like
you
know,
I
mean
I
I,
it's
very
hard
to
come
up
with
a
number,
because
it's
based
on
your
infrastructures
and
environment,
but
key
point
is
it
just
runs
this
separate
process,
which
makes
it
more
easy
that
it
will
be
definitely
add
up
some
some
overhead
into
it.
B
B
B
Yes,
Bongos
pins
demox
servers,
so
you
can
actually
change
the
Bongo
Docker
file.
If
you
wanted
to
do
that
because
it's
publicly
available
so
right
now,
I,
don't
think
so
you
can
stop
the
response.
But
if
you
wanted
to
have
your
box
server,
then
something
you
can
do
within
the
concordoca
file.
B
B
Is
there
any
way
to
debug
glue
a
plugin?
Unfortunately,
now
there
is
no
debugger
available
for
now.
What
we
do
usually
is
we
just
create
lot
and
lots
more
test
cases
and
we
just
go
old
school
style.
You
know
add
some
logging
around
it
to
find
out
what
is
going
on.
B
Can
conflict
and
execute
the
external
script
I.
Would
how
doubt
why
you
would
do
that
because
the
Chrome
plugin
is
all
about
your
API
request:
API
policy
and
business.
B
You
know
business
logic,
so
if
you
want
to
execute
a
Linux
script,
I
think
you
are
on
the
wrong
path,
because
that's
primarily
for
your
for
your
API
requesting
response.
Hope
that's
a
question.
B
Okay,
so
there
are
around
your
question:
marching
transforming
request
and
response.
So
we
have
our
open
source
plugin
around
the
request,
transfer
Transformer!
You
can
go
and
read
more
about
it.
You'll
get
good
good
material
around
how
to
use
our
pdk
to
do
that.
B
So
that's.
The
next
question
is:
is
hard
work
plugin
asynchronous?
No,
they
are
not.
They
are
basically,
you
know,
have
executing
same
request
and
response
phase,
so
they
just
execute
in
the
in
the
order
which
you
configure
foreign.
B
Yes,
there
is.
The
next
question
is
around
the
unit
test
for
the
golang.
Yes,
you
can
write
DNA
test
for
the
caller.
If
you
go
into
our
Kong,
you
know
plugin
development,
where
there
is
a
link
for
this.
You
know
developing
a
plugin
into
a
into
a
different
language
and
there
is
a
good
material
around
there
around
the
go
and
JavaScript.
B
Question
from
Ron
reading,
it's.
B
Yes,
roll
you're
right
again
answering
the
same,
go
python.
They
run
into
a
separate
process.
So
when
I
say
you
know,
optimized,
you
can
optimize
your
business
Logics,
of
course,
within
Lua
and
and
Kong
really
lower
in
your
goal.
But
in
terms
of
your
you
know,
runtime
performance
between
Lua
and
then
the
any
other
language
is
that
argument.
B
Okay,
so
are
there
any
lower
libraries
for
soft?
Yes,
in
fact,
one
of
our
engineer
has
returned
into
it.
So
there
is
a
XML.
You
know
the
the
I
think
it's
XML
threat
and
there
is
a
stable
detection,
plugin
being
written
by
by
one
of
our
Engineers,
so
they
have.