Skip to content

Performance degradation using SSL #133

Closed
@theaaron123

Description

@theaaron123

When connecting with HTTPS to a Flask SocketIO server I'm seeing a slowdown of 20 seconds waiting for a response compared to http.

This is happening with header auth and with certificate auth.

let socket = SocketBuilder::new("https://$IP$".to_string())
        .opening_header(
            "Authorization",
            settings.header_auth_value.as_str()
        )
        .on("open", connect_callback)
        .on("submit", submit_callback)
        .on("error", |err, _| {
            warn!("Server Connection Error: {:#?}", err)
        })
        .on("error", |err, _| eprintln!("Error: {:#?}", err))
        // .transport_type(TransportType::WebsocketUpgrade)
        //  .tls_config(tls_connector)
        .connect();

I can see in the nginx logs that the websocket upgrade is switching protocols

client GET /socket.io/?EIO=4&sid=n4wlLsEmzjqGaiGHAAAG&transport=websocket HTTP/1.1 101 45

Any ideas on what could be going wrong?

PS. Not seeing this degradation with python socket io client

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions