Jiyus
  • All Resources & Services
    • Compute
      • Virtual Instances
      • Bare Metal Instances
      • Managed Kubernetes
      • Big Data
      • Functions Engine
      • Data Protection
    • Services
      • Managed Databases
      • Applications Marketplace
      • Orchestration
      • Developer Tools
      • Management Tools
      • User Interface
    • Storage
      • Object Storage
      • Block Storage
      • File Storage
    • Networking
      • Software-Defined Networking
  • Why Choose Jiyus?
  • Pricing
  • Security
  • About
Jiyus
  • All Resources & Services
    • Compute
      • Virtual Instances
      • Bare Metal Instances
      • Managed Kubernetes
      • Big Data
      • Functions Engine
      • Data Protection
    • Services
      • Managed Databases
      • Applications Marketplace
      • Orchestration
      • Developer Tools
      • Management Tools
      • User Interface
    • Storage
      • Object Storage
      • Block Storage
      • File Storage
    • Networking
      • Software-Defined Networking
  • Why Choose Jiyus?
  • Pricing
  • Security
  • About

How to Set Up Ambassador with Socket.io

byYulong Song inUncategorized posted onJuly 18, 2019
0
0

Long story short: I need events in my application.

A little bit more about the project: I’m building a large-scale web application with micro-service architecture. We use Kubernetes to deploy our micro-services with Ambassador acting as the gateway. Everything works great until I need to have a prefix for my Socket.io micro-service.

As usual, I create my service yaml like this:

— -
apiVersion: v1
kind: Service
metadata:
 name: test-socket
 annotations:
 getambassador.io/config: |
 — -
 apiVersion: ambassador/v1
 kind: Mapping
 name: test_socket_mapping
 prefix: /test/
 service: test-socket
 timeout_ms: 20000
 use_websocket: true
spec:
 selector:
 app: test-socket
 ports:
 — name: first
 protocol: TCP
 port: 443
 targetPort: 8000
 — name: second
 protocol: TCP
 port: 80
 targetPort: 8000

Also the deployment yaml like this:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: test-socket
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: test-socket
    spec:
      containers:
      - name: spiderkube-event-container
        image: sylhero/test-socket
        env:
        - name: NODE_ENV
          value: "development"
        imagePullPolicy: Always
        ports:
        - containerPort: 8000
        livenessProbe:
          tcpSocket:
            port: 8000
          initialDelaySeconds: 30
          periodSeconds: 10
          successThreshold: 1

Life is good. All I need to do is connect my newly deployed test-socket micro-service with my socket client.

I have a simple test client like this:

const
    io = require("socket.io-client"),
    ioClient = io.connect("https://dev.test.io/test"); 

What I expect to see on the pod log is something that says “connection success” or “receiving request from 1.1.1.1”, etc. However, I don’t see anything on the pod log. Everything works fine on my local! After I spent a whole day looking into this, I finally figured out:

It’s the client path.

I updated my test client code like this:

const
    io = require("socket.io-client"),
    ioClient = io.connect("https://dev.test.io", {
     path: "/test/socket.io/"
    });

Voila! Now it works like a charm!

Ambassador is a great gateway for Kubernetes but it’s also very new as a result, documentation is always in need. Hopefully, my small article can contribute to it and help people who are doing the same thing with Ambassador.

Source code link: https://github.com/sylhero/test-socket

This article was originally published on Medium.

OpenStack Summit

Share:
Yulong Song

Yulong leads the team that’s developing Ormuco's dynamic application deployment platform, with responsibilities in front-end development and DevOps. Yulong has previously worked as a Full-Stack Developer at Ormuco. He graduated with a Master of Computer Science from Concordia University and a Bachelor of Management Science from University of Shanghai for Science and Technology.

Previous

A Quickstart Guide to Deploying Qinling in Production

Next

Currying Functions in JavaScript, Recursively

Keep on reading

May 20, 2026
Starting birkenheadavenuedental.co.nz Designs and begin Equity National infrastructure pertaining to On the web Casinos
No Comments
May 29, 2026
Порядка обеспечения доверенной работы и защиты Motor Казино зеркало игроков
No Comments
June 1, 2026
Бонусы вулкан казино официальный сайт с бонусами и програмки преданности онлайн-казино: разъяснение.
No Comments

Search

Categories

  • ! Без рубрики
  • 1
  • 10-лучших-казино-онлайн-50
  • 100%A Z
  • 1000A Z
  • 11
  • 111
  • 12
  • 1200A Z
  • 1500A Z
  • 1500A Z
  • 17
  • 1800A Z
  • 19
  • 2
  • 2000A Z
  • 2000A Z
  • 2000A Z
  • 2000A_2 Z
  • 20bet
  • 21
  • 3
  • 3000A Z
  • 3000A Z
  • 4
  • 400A Z
  • 5
  • 500A Z
  • 6
  • 62
  • 6400A G
  • 6400A Z
  • 800A Z
  • 9
  • a16z generative ai
  • admzgem.ru a 500
  • All Check
  • all script 60
  • alliance-teh.ru
  • Allyspin
  • aloadofblarney.ie
  • anastasia-uz.ru b 200
  • Aphrodite Casino
  • Ardente Casino
  • articles
  • audenza.com
  • aug_pinco
  • avite.ru a 1500
  • Bananzia Casino
  • bancrf.ru 401
  • Baxterbet Casino
  • best online casino
  • best-online-casinos-ie.rogueaba.com
  • Betfouru Casino
  • betlabel
  • Betninja Casino
  • Betorange Casino
  • bh
  • bizzo casino
  • Blog
  • BLOG DE
  • blog-ch
  • Bonuskong Casino
  • bonusy-za-registratsiju.clients.site 505
  • boomerang
  • Brite Casino
  • bt
  • bt_main
  • Buffbets Casino
  • Business
  • campobet
  • captain cooks
  • casino
  • casino ch
  • Casino DE
  • casino en ligne paypal
  • Casino Julius
  • Casino Leon
  • Casino Lizaro
  • Casino Olympe
  • casino utan svensk licens
  • casino zonder crucks
  • casino-exoterikou.gr.com
  • casumo
  • cazeus
  • ch
  • ChanceBit Casino
  • Chicken Road 2
  • cinematheque.ru a 1200
  • Cloud News
  • cocobet
  • comp-doma.ru a 1200
  • comp-doma.ru a 1600
  • Computers, Games
  • conwyvalleyrailway.co.uk
  • crossarea.ru a 1200
  • cslovo.com a 1500
  • cuphead.ru a 500
  • CuppaWins Casino
  • cwexpo
  • Daily Mriya Social
  • daya4d13345.netlify.app 515
  • de.trustpilot.com 1500
  • deutschklasse.ru a 1500
  • Developers Corner
  • diffdrum.co.uk
  • Divas Luck Casino
  • Dolly Casino
  • dom2online.net 1004
  • ds29podtes.ru 408
  • Duffspin Casino
  • duospin
  • dzheton-geyms-casino.xyz
  • edinburghjesuitcentre
  • evolucionika.ru a 1000
  • Evolve Casino
  • exactlyawards.ru 1000
  • exactlyawards.ru 2000
  • exactlyawards.ru a 1500
  • fairspin
  • fanstyle.ru 1000
  • findfood.ru 2000
  • FoxSlots Casino
  • Fridayroll
  • frmrbook.ru
  • frumzi
  • Gambling
  • gameloop-app.ru a 750
  • Games
  • gametrick.ru 414
  • getbottle.ru a 750
  • Giochi
  • Golden Mister Casino
  • Golisimo Casino
  • gospmr.ru a 1200
  • gransino
  • guelman.ru a 1200
  • halalstarter.com 401
  • healthfreedom.net b 500
  • helpalfa.ru a 750
  • house of jack
  • HR News
  • ianed.ru 1110
  • igra-pokerdom-otzyvy.clients.site 521
  • igralnice online
  • Ilmaiskierrokset Ilman Talletusta
  • ipg-ltd
  • isibiri.ru a 1200
  • iwild
  • Iwild Casino
  • jetton-igra-casino.xyz
  • Jule_pb_common
  • jule_pb_ormanistanbul.com
  • Julius Casino
  • jully_rb_sarosdanenerede.com
  • july_pinco_common
  • July_pinco_Sepi
  • Kakadu Casino
  • kazino-pokerdom.clients.site b 250
  • Kingdom Casino Login
  • ko-ito-to.netlify.app 519
  • kontorra.ru b 750
  • kopi771.netlify.app 511
  • kz-ru
  • Lalabet Casino App
  • Lamabet Casino
  • lav-lav.com a 500
  • le-bandit-play.comen a 1000
  • legiano
  • liceumzima.ru a 750
  • lidmart.com 2000
  • Lizaro
  • Lizaro Casino
  • Lolajack Casino
  • Love Casino
  • Lucki Casino
  • Lucky Minning Casino
  • Lucky Mister Casino
  • lucky-pharao-de.de 1004
  • Mafia Casino
  • magius
  • master-chehol.ru b 750
  • mba-mini.ru 421
  • Monsterwin
  • monteon.ru
  • Mr Pacho
  • mufortune.ru b 200
  • Mystake Casino
  • nail-supermaster.ru
  • Nana Casino
  • nardcare.ru b 500
  • narkologyserbskogo.ru b 500
  • national casino
  • National Casino Login
  • nauticboats.ru 2000
  • News
  • nine casino
  • norm-casino-20
  • normcasino8007.com 502
  • nykhas.ru 414
  • online-winx-games.ru 425
  • other
  • Oxi Casino
  • paypal casino canada
  • Paysafecard Casino
  • pb
  • pc
  • pistolo
  • platinum play
  • playamo
  • playfortuna
  • poker-online-20
  • poker-online-50
  • pokerdom test 2 – Copy
  • pokerdom test 2 — копия
  • pokerdom-brauzer.clients.site 526
  • pokerdom-mobilnaja-versija-1790001689091.clients.site 504
  • pokerdom-official-2026.web.app b 250
  • pokerdom-ofitsialnyj-sajt-1790057697145.clients.site 508
  • pokerdom-ofitsialnyj-sajt.clients.site a 250
  • pokerdom-ofitsialnyj.clients.site b 250
  • pokerdom-zerkalo-vhod.web.app b 250
  • poleznenko.ru
  • politgen.ru 200
  • Post
  • Press Releases
  • ptmap.ru 1000
  • pu
  • public
  • Qzino Casino
  • razorshark-game.de 1001
  • rb_kasynolupa
  • rc-langepas.ru 2000
  • rdoctor.ru 2000
  • Retail News
  • review
  • riccinatalia.com 1005
  • Ringospin Casino
  • robocat
  • rocketplay
  • roobet
  • rprf.ru a 1200
  • sajt-pokerdom.clients.site b 250
  • santekhnicheskieraboti-podolsk.ru 405
  • Sat AT
  • sat-ch
  • skycrown
  • slota
  • Slotexo Casino
  • Slotlair Casino
  • slotsgem
  • Spellen
  • Spiele
  • spinanga
  • spinbetter
  • spinit
  • Spins
  • Spins Castle Casino
  • Spinscastle Casino
  • sportaza
  • spu30.ru 1500
  • stage4u.ru 2000
  • Stake Casino France
  • studio-petukh.ru a 1000
  • t.mebonus_pokerdom 1008
  • t.meofficial_site_pokerdom 1006
  • t.meofficial_site_pokerdom 1012
  • t.meofitsialny_pokerdom 1009
  • t.mepoker_pokerdom
  • t.mepokerdom_oficial 1001
  • t.mepokerdom_otzyvy 1010
  • t.meriobet_com 1006
  • t.meriobet_fs 1003
  • t.meriobet_fs 1503
  • tarif73.ru a 1300
  • Technology
  • textsHU
  • thebeautifullife
  • thunderpick
  • Trading
  • Trustly Casino
  • tsars
  • Twinqo Casino
  • Uncategorized
  • Unlimluck
  • Utilities News
  • Uudet Verovapaat Nettikasinot
  • Vasy Casino
  • Verovapaa Kasino
  • Verywell Casino
  • Verywell Casino Uk
  • wazamba
  • wdbos333.netlify.app 505
  • winbay
  • Winbeast
  • wingaga
  • Winlegends Casino
  • Winnita Casino
  • Winsmania Casino
  • wiz slots
  • www.admsoln.ru a 1500
  • www.cashbaka.ru 2000
  • www.laufen.ru 2000
  • www.montessori-center.ru 1000
  • www.notarius-falkova.ru a 1200
  • www.youtube.com@Exotflorastino
  • xena-casino-greece.eu.com
  • zerkalo-pokerdom.clients.site b 250
  • Блог
  • игровые-автоматы-norm-casino-20
  • Казино
  • казино-на-деньги-50
  • мойдомисад.рф b 200
  • Сплиты
  • яокб.рф a 1200

Jiyus

Jiyus is an infrastructure-as-a-service platform that aggregates the computing resources of local data center providers, and transforms these resources into a global network of decentralized computing. Resources available on Jiyus include compute, storage, networking, and databases.

CREATE AN ACCOUNT

Company

  • Why Choose Jiyus?
  • Newsroom

Legal

  • Privacy Policy
  • Security
  • Pricing

Contact Us

  • info@jiyus.com
© 2020 Ormuco Inc.