Skip to content

Socket upgrade to V4 with prometheus support#24

Merged
saghul merged 15 commits intojitsi:masterfrom
yashop7:socketV4-prom
Jul 23, 2025
Merged

Socket upgrade to V4 with prometheus support#24
saghul merged 15 commits intojitsi:masterfrom
yashop7:socketV4-prom

Conversation

@yashop7
Copy link
Contributor

@yashop7 yashop7 commented May 31, 2025

  • Socket upgraded to V4.8
  • Prometheus Support
  • More compatible with the newer version of Excalidraw(>v18)

Prometheus Working Fine
Screenshot 2025-05-31 at 4 24 48 PM
Screenshot 2025-05-31 at 4 29 56 PM

src/index.ts Outdated
cors: {
allowedHeaders: ["Content-Type", "Authorization"],
origin: process.env.CORS_ORIGIN || "*",
credentials: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this credentials imply?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's for authentication cookies, I removed it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's still there?

src/index.ts Outdated
serverDebug(`${clientSocket} has left the ${roomID} room because the user limit was reached.`);
clientSocket.leave(roomID);
});
const isFollowRoom = roomID.startsWith("follow@");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will be of use to newer excalidraw version when we upgrade it

src/index.ts Outdated
});
});
});
} catch (error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to surroung all that in a try-catch, we want the Node process to abort if setting up the socket fails.

Copy link
Member

@saghul saghul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with a minior comment. @mihhu let's test it locally before merge.

src/index.ts Outdated
cors: {
allowedHeaders: ["Content-Type", "Authorization"],
origin: process.env.CORS_ORIGIN || "*",
credentials: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's still there?

@yashop7
Copy link
Contributor Author

yashop7 commented Jun 5, 2025

@saghul, backend is working fine with Jitsi meet, I have tested it locally

@saghul
Copy link
Member

saghul commented Jun 5, 2025

Great news! Can you please add some simple CI which runs the linter and checks that it builds succesfully?

@yashop7
Copy link
Contributor Author

yashop7 commented Jun 5, 2025

Got it! I haven’t set up CI before, but I’ll definitely work on adding them, Will reach out if I need help

@yashop7
Copy link
Contributor Author

yashop7 commented Jun 9, 2025

@saghul Can you review the changes

@saghul
Copy link
Member

saghul commented Jun 16, 2025

Can you please use the latest Node LTS? That would be 22.

@GoliathLabs
Copy link
Contributor

Any updates on this?

@yashop7
Copy link
Contributor Author

yashop7 commented Jul 7, 2025

Yeah, PR is ready to merge

@saghul
Copy link
Member

saghul commented Jul 7, 2025

@mihhu Any objections?

@GoliathLabs
Copy link
Contributor

We should also consider updating the Dockerfile for the Docker Hub publishing workflow.

@saghul
Copy link
Member

saghul commented Jul 8, 2025

@GoliathLabs Good point! @yashop7 could you please do that?

@GoliathLabs
Copy link
Contributor

GoliathLabs commented Jul 9, 2025

Since we're here, it might be a good idea to specify a UID in the Dockerfile to run the container as, which would improve security.

It could look smth like this

FROM node:22-slim

WORKDIR /excalidraw-backend

COPY package*.json ./

RUN npm ci

COPY tsconfig.json ./
COPY src ./src

RUN npm run build

USER 1001

EXPOSE 80
EXPOSE 9090

CMD ["npm", "start"]

@yashop7 yashop7 requested a review from saghul July 9, 2025 10:55
@GoliathLabs
Copy link
Contributor

@saghul should be ready to merge now

@saghul saghul merged commit 90a89a5 into jitsi:master Jul 23, 2025
1 check passed
This was referenced Jul 23, 2025
@Movion
Copy link

Movion commented Aug 25, 2025

Hey - there has no new release on the github page yet with this changes, could you please initialize that?

@GoliathLabs
Copy link
Contributor

Before creating a new release, I've created a "chore PR": #25.

@Movion
Copy link

Movion commented Dec 29, 2025

Sorry to bother again but why exactly got the "USER_LIMIT" Feature got removed in this pull from the 5edc587 commit?
Will this be re-added in a later release or is this no longer needed?

@saghul
Copy link
Member

saghul commented Dec 29, 2025

That must have been an oversight. Good catch! We'll need it back.

@yashop7
Copy link
Contributor Author

yashop7 commented Dec 29, 2025

I'll make a separate PR for this issue

@yashop7 yashop7 deleted the socketV4-prom branch December 29, 2025 20:01
@Movion
Copy link

Movion commented Jan 22, 2026

Somehow it is still "working" from jitsi side, because of this code:
jitsi/jitsi-meet#13870

Just for your information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants